Removed observable addon from loading on import db
This commit is contained in:
parent
c316f21020
commit
83d80fbbbd
@ -117,7 +117,7 @@ function ImportExportModal({ isOpen, onRequestClose }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleImportSelectorClose() {
|
async function handleImportSelectorClose() {
|
||||||
const importDB = getDatabase({}, importDBName);
|
const importDB = getDatabase({ addons: [] }, importDBName);
|
||||||
await importDB.delete();
|
await importDB.delete();
|
||||||
importDB.close();
|
importDB.close();
|
||||||
setShowImportSelector(false);
|
setShowImportSelector(false);
|
||||||
@ -129,7 +129,7 @@ function ImportExportModal({ isOpen, onRequestClose }) {
|
|||||||
setShowImportSelector(false);
|
setShowImportSelector(false);
|
||||||
loadingProgressRef.current = 0;
|
loadingProgressRef.current = 0;
|
||||||
|
|
||||||
const importDB = getDatabase({}, importDBName);
|
const importDB = getDatabase({ addons: [] }, importDBName);
|
||||||
const db = getDatabase({});
|
const db = getDatabase({});
|
||||||
try {
|
try {
|
||||||
// Keep track of a mapping of old token ids to new ones to apply them to the map states
|
// Keep track of a mapping of old token ids to new ones to apply them to the map states
|
||||||
|
@ -28,7 +28,7 @@ function SelectDataModal({
|
|||||||
async function loadData() {
|
async function loadData() {
|
||||||
if (isOpen && databaseName) {
|
if (isOpen && databaseName) {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const db = getDatabase({}, databaseName);
|
const db = getDatabase({ addons: [] }, databaseName);
|
||||||
let loadedMaps = {};
|
let loadedMaps = {};
|
||||||
let loadedTokensByMap = {};
|
let loadedTokensByMap = {};
|
||||||
let loadedTokens = {};
|
let loadedTokens = {};
|
||||||
|
@ -124,12 +124,16 @@ let service = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ensure import DB is cleared before importing new data
|
// Ensure import DB is cleared before importing new data
|
||||||
let importDB = getDatabase({}, databaseName, 0);
|
let importDB = getDatabase({ addons: [] }, databaseName, 0);
|
||||||
await importDB.delete();
|
await importDB.delete();
|
||||||
importDB.close();
|
importDB.close();
|
||||||
|
|
||||||
// Load import database up to it's desired version
|
// 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, {
|
await importInto(importDB, data, {
|
||||||
progressCallback,
|
progressCallback,
|
||||||
acceptNameDiff: true,
|
acceptNameDiff: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user