You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-04 05:02:41 +03:00
switch to imperative try...finally
This commit is contained in:
@@ -412,13 +412,15 @@ export class LocalIndexedDBStoreBackend implements IIndexedDBBackend {
|
||||
this.isPersisting = true;
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
this.persistUserPresenceEvents(userTuples),
|
||||
this.persistAccountData(syncData.accountData),
|
||||
this.persistSyncData(syncData.nextBatch, syncData.roomsData),
|
||||
]).finally(() => {
|
||||
try {
|
||||
await Promise.all([
|
||||
this.persistUserPresenceEvents(userTuples),
|
||||
this.persistAccountData(syncData.accountData),
|
||||
this.persistSyncData(syncData.nextBatch, syncData.roomsData),
|
||||
]);
|
||||
} finally {
|
||||
this.isPersisting = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user