forked from Mirrors/doipjs
Add promise.allSettled polyfill
This commit is contained in:
parent
751a8cb6e3
commit
333acd5c0d
1 changed files with 12 additions and 0 deletions
|
@ -21,6 +21,18 @@ const serviceproviders = require('./serviceproviders')
|
|||
const keys = require('./keys')
|
||||
const utils = require('./utils')
|
||||
|
||||
// Promise.allSettled polyfill
|
||||
Promise.allSettled = Promise.allSettled || ((promises) => Promise.all(promises.map(p => p
|
||||
.then(v => ({
|
||||
status: 'fulfilled',
|
||||
value: v,
|
||||
}))
|
||||
.catch(e => ({
|
||||
status: 'rejected',
|
||||
reason: e,
|
||||
}))
|
||||
)));
|
||||
|
||||
const runVerificationJson = (
|
||||
res,
|
||||
proofData,
|
||||
|
|
Loading…
Reference in a new issue