fix error path on transaction abort error

This commit is contained in:
Bruno Windels 2019-11-21 18:23:48 +01:00
parent d073f2825b
commit 5ecf0a6717

View file

@ -35,7 +35,7 @@ export function reqAsPromise(req) {
export function txnAsPromise(txn) {
return new Promise((resolve, reject) => {
txn.addEventListener("complete", resolve);
txn.addEventListener("abort", e => reject(wrapError(e)));
txn.addEventListener("abort", event => reject(wrapError(event.target.error)));
});
}