diff --git a/src/modals/ImportExportModal.js b/src/modals/ImportExportModal.js index d7d33f7..0552056 100644 --- a/src/modals/ImportExportModal.js +++ b/src/modals/ImportExportModal.js @@ -117,7 +117,7 @@ function ImportExportModal({ isOpen, onRequestClose }) { } async function handleImportSelectorClose() { - const importDB = getDatabase({}, importDBName); + const importDB = getDatabase({ addons: [] }, importDBName); await importDB.delete(); importDB.close(); setShowImportSelector(false); @@ -129,7 +129,7 @@ function ImportExportModal({ isOpen, onRequestClose }) { setShowImportSelector(false); loadingProgressRef.current = 0; - const importDB = getDatabase({}, importDBName); + const importDB = getDatabase({ addons: [] }, importDBName); const db = getDatabase({}); try { // Keep track of a mapping of old token ids to new ones to apply them to the map states diff --git a/src/modals/SelectDataModal.js b/src/modals/SelectDataModal.js index 424f816..e716eb8 100644 --- a/src/modals/SelectDataModal.js +++ b/src/modals/SelectDataModal.js @@ -28,7 +28,7 @@ function SelectDataModal({ async function loadData() { if (isOpen && databaseName) { setIsLoading(true); - const db = getDatabase({}, databaseName); + const db = getDatabase({ addons: [] }, databaseName); let loadedMaps = {}; let loadedTokensByMap = {}; let loadedTokens = {}; diff --git a/src/workers/DatabaseWorker.js b/src/workers/DatabaseWorker.js index 945072c..953921a 100644 --- a/src/workers/DatabaseWorker.js +++ b/src/workers/DatabaseWorker.js @@ -124,12 +124,16 @@ let service = { } // Ensure import DB is cleared before importing new data - let importDB = getDatabase({}, databaseName, 0); + let importDB = getDatabase({ addons: [] }, databaseName, 0); await importDB.delete(); importDB.close(); // Load import database up to it's desired version - importDB = getDatabase({}, databaseName, importMeta.data.databaseVersion); + importDB = getDatabase( + { addons: [] }, + databaseName, + importMeta.data.databaseVersion + ); await importInto(importDB, data, { progressCallback, acceptNameDiff: true,