You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Close the DB right away
This seems to be needed in Chrome to avoid blocking future opens.
This commit is contained in:
@@ -35,6 +35,8 @@ export function exists(indexedDB, dbName) {
|
|||||||
};
|
};
|
||||||
req.onblocked = () => reject();
|
req.onblocked = () => reject();
|
||||||
req.onsuccess = () => {
|
req.onsuccess = () => {
|
||||||
|
const db = req.result;
|
||||||
|
db.close();
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
// The DB did not exist before, but has been created as part of this
|
// The DB did not exist before, but has been created as part of this
|
||||||
// existence check. Delete it now to restore previous state. Delete can
|
// existence check. Delete it now to restore previous state. Delete can
|
||||||
|
|||||||
Reference in New Issue
Block a user