mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-23 06:59:29 -07:00
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 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
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue