forked from Mirrors/doipjs
Allow promises to reject without blocking execution
This commit is contained in:
parent
35b52aa6d4
commit
eca111aaa7
1 changed files with 8 additions and 4 deletions
|
@ -123,8 +123,10 @@ const verify = async (input, fingerprint, opts) => {
|
|||
})
|
||||
})
|
||||
|
||||
return Promise.all(promises).then((values) => {
|
||||
return values
|
||||
return Promise.allSettled(promises).then((values) => {
|
||||
return values.map((obj, i) => {
|
||||
return obj.value
|
||||
})
|
||||
})
|
||||
}
|
||||
if (input instanceof Array) {
|
||||
|
@ -140,8 +142,10 @@ const verify = async (input, fingerprint, opts) => {
|
|||
})
|
||||
})
|
||||
|
||||
return Promise.all(promises).then((values) => {
|
||||
return values
|
||||
return Promise.allSettled(promises).then((values) => {
|
||||
return values.map((obj, i) => {
|
||||
return obj.value
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue