diff --git a/lodash.js b/lodash.js index 86b22c9b1..d022e6ccb 100644 --- a/lodash.js +++ b/lodash.js @@ -6271,10 +6271,13 @@ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; + var type = typeof value + length = length == null ? MAX_SAFE_INTEGER : length + return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length) } /**