Allow promises to reject without blocking execution

This commit is contained in:
Yarmo Mackenbach 2020-12-10 23:21:22 +01:00
parent 35b52aa6d4
commit eca111aaa7

View file

@ -123,8 +123,10 @@ const verify = async (input, fingerprint, opts) => {
}) })
}) })
return Promise.all(promises).then((values) => { return Promise.allSettled(promises).then((values) => {
return values return values.map((obj, i) => {
return obj.value
})
}) })
} }
if (input instanceof Array) { if (input instanceof Array) {
@ -140,8 +142,10 @@ const verify = async (input, fingerprint, opts) => {
}) })
}) })
return Promise.all(promises).then((values) => { return Promise.allSettled(promises).then((values) => {
return values return values.map((obj, i) => {
return obj.value
})
}) })
} }