mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Add checks to iteratorSymbol assignment.
This commit is contained in:
@@ -1329,7 +1329,7 @@
|
|||||||
clearTimeout = context.clearTimeout,
|
clearTimeout = context.clearTimeout,
|
||||||
enumerate = Reflect ? Reflect.enumerate : undefined,
|
enumerate = Reflect ? Reflect.enumerate : undefined,
|
||||||
getPrototypeOf = Object.getPrototypeOf,
|
getPrototypeOf = Object.getPrototypeOf,
|
||||||
iteratorSymbol = Symbol.iterator,
|
iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined,
|
||||||
parseFloat = context.parseFloat,
|
parseFloat = context.parseFloat,
|
||||||
pow = Math.pow,
|
pow = Math.pow,
|
||||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||||
@@ -8677,7 +8677,7 @@
|
|||||||
if (isArrayLike(value)) {
|
if (isArrayLike(value)) {
|
||||||
return value.length ? copyArray(value) : [];
|
return value.length ? copyArray(value) : [];
|
||||||
}
|
}
|
||||||
if (value[iteratorSymbol]) {
|
if (iteratorSymbol && value[iteratorSymbol]) {
|
||||||
return iteratorToArray(value[iteratorSymbol]());
|
return iteratorToArray(value[iteratorSymbol]());
|
||||||
}
|
}
|
||||||
var tag = objToString.call(value),
|
var tag = objToString.call(value),
|
||||||
|
|||||||
Reference in New Issue
Block a user