aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/backup-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/settings/backup-controller.js')
-rw-r--r--ext/js/pages/settings/backup-controller.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index 5c168849..f0876d3f 100644
--- a/ext/js/pages/settings/backup-controller.js
+++ b/ext/js/pages/settings/backup-controller.js
@@ -574,12 +574,16 @@ export class BackupController {
* @returns {Promise<Blob>}
*/
async _exportDatabase(databaseName) {
- const db = await new Dexie(databaseName).open();
+ const DexieConstructor = /** @type {import('dexie').DexieConstructor} */ (/** @type {unknown} */ (Dexie));
+ const db = new DexieConstructor(databaseName);
+ await db.open();
+ /** @type {unknown} */
+ // @ts-expect-error - The export function is declared as an extension which has no type information.
const blob = await db.export({
progressCallback: this._databaseExportProgressCallback.bind(this)
});
- await db.close();
- return blob;
+ db.close();
+ return /** @type {Blob} */ (blob);
}
/** */