mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Avoid undefined length variable use in createExtremum.
This commit is contained in:
@@ -3470,8 +3470,9 @@
|
|||||||
: callback(iteratee, thisArg, 3);
|
: callback(iteratee, thisArg, 3);
|
||||||
|
|
||||||
if (noIteratee || (isArr && iteratee.length == 1)) {
|
if (noIteratee || (isArr && iteratee.length == 1)) {
|
||||||
var result = arrayExtremum(isArr ? collection : toIterable(collection), iteratee, comparator, exValue);
|
collection = isArr ? collection : toIterable(collection);
|
||||||
if (noIteratee || !(length && result === exValue)) {
|
var result = arrayExtremum(collection, iteratee, comparator, exValue);
|
||||||
|
if (noIteratee || !(collection.length && result === exValue)) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user