Add isIterateeCall checks back to _.every and _.some.

This commit is contained in:
John-David Dalton
2015-08-23 18:41:11 -07:00
parent 0a9c9411f0
commit b0d6c34565

View File

@@ -5878,7 +5878,9 @@
*/
function every(collection, predicate, guard) {
var func = isArray(collection) ? arrayEvery : baseEvery;
predicate = guard ? undefined : predicate;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate));
}
@@ -6513,7 +6515,9 @@
*/
function some(collection, predicate, guard) {
var func = isArray(collection) ? arraySome : baseSome;
predicate = guard ? undefined : predicate;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate));
}