diff --git a/lodash.js b/lodash.js index be338aa0c..43f717597 100644 --- a/lodash.js +++ b/lodash.js @@ -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)); }