fix(predicates): typo

This commit is contained in:
Julien Fontanet 2022-02-18 16:52:06 +01:00
parent 2183422eb5
commit 6e38cf2bc1

View File

@ -41,7 +41,7 @@ exports.every = function every() {
}
return function everyPredicate() {
for (let i = 0; i < n; ++i) {
if (!predicates[0].apply(this, arguments)) {
if (!predicates[i].apply(this, arguments)) {
return false
}
}
@ -60,7 +60,7 @@ exports.some = function some() {
}
return function somePredicate() {
for (let i = 0; i < n; ++i) {
if (predicates[0].apply(this, arguments)) {
if (predicates[i].apply(this, arguments)) {
return true
}
}