fix(async-map/asyncMapSettled): fix hasError condition

This commit is contained in:
Julien Fontanet 2021-03-01 17:22:05 +01:00
parent cdfeb094b3
commit f16e29c63e

View File

@ -36,7 +36,7 @@ exports.asyncMapSettled = function asyncMapSettled(iterable, mapFn, thisArg = it
}
}
const onValue = (i, value) => {
const hasError = result !== undefined
const hasError = result === undefined
if (!hasError) {
result[i] = value
}