mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
fix error path on transaction abort error
This commit is contained in:
parent
d073f2825b
commit
5ecf0a6717
@ -35,7 +35,7 @@ export function reqAsPromise(req) {
|
|||||||
export function txnAsPromise(txn) {
|
export function txnAsPromise(txn) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
txn.addEventListener("complete", resolve);
|
txn.addEventListener("complete", resolve);
|
||||||
txn.addEventListener("abort", e => reject(wrapError(e)));
|
txn.addEventListener("abort", event => reject(wrapError(event.target.error)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user