forked from mystiq/hydrogen-web
no need to capture req here
This commit is contained in:
parent
d4d7adc7fc
commit
184480ad36
1 changed files with 3 additions and 2 deletions
|
@ -81,8 +81,9 @@ export function reqAsPromise(req) {
|
||||||
resolve(event.target.result);
|
resolve(event.target.result);
|
||||||
needsSyncPromise && Promise._flush && Promise._flush();
|
needsSyncPromise && Promise._flush && Promise._flush();
|
||||||
});
|
});
|
||||||
req.addEventListener("error", () => {
|
req.addEventListener("error", event => {
|
||||||
reject(new IDBRequestError(req));
|
const error = new IDBRequestError(event.target);
|
||||||
|
reject(error);
|
||||||
needsSyncPromise && Promise._flush && Promise._flush();
|
needsSyncPromise && Promise._flush && Promise._flush();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue