mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Add isIterateeCall checks back to _.every and _.some.
This commit is contained in:
@@ -5878,7 +5878,9 @@
|
|||||||
*/
|
*/
|
||||||
function every(collection, predicate, guard) {
|
function every(collection, predicate, guard) {
|
||||||
var func = isArray(collection) ? arrayEvery : baseEvery;
|
var func = isArray(collection) ? arrayEvery : baseEvery;
|
||||||
predicate = guard ? undefined : predicate;
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
||||||
|
predicate = undefined;
|
||||||
|
}
|
||||||
return func(collection, getIteratee(predicate));
|
return func(collection, getIteratee(predicate));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6513,7 +6515,9 @@
|
|||||||
*/
|
*/
|
||||||
function some(collection, predicate, guard) {
|
function some(collection, predicate, guard) {
|
||||||
var func = isArray(collection) ? arraySome : baseSome;
|
var func = isArray(collection) ? arraySome : baseSome;
|
||||||
predicate = guard ? undefined : predicate;
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
||||||
|
predicate = undefined;
|
||||||
|
}
|
||||||
return func(collection, getIteratee(predicate));
|
return func(collection, getIteratee(predicate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user