summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/indexeddb.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/indexeddb.js b/common/indexeddb.js
index c6302fa..96d19b7 100644
--- a/common/indexeddb.js
+++ b/common/indexeddb.js
@@ -92,7 +92,7 @@ async function idb_del(transaction, store_name, key)
}
/* Open haketilo database, asynchronously return an IDBDatabase object. */
-async function get_db(data=initial_data)
+async function get_db()
{
if (db)
return db;
@@ -120,9 +120,8 @@ async function get_db(data=initial_data)
for (const [store_name, key_mode] of stores)
store = opened_db.createObjectStore(store_name, key_mode);
- const context = make_context(store.transaction, data.files);
-
- await _save_items(data.resources, data.mappings, context);
+ const ctx = make_context(store.transaction, initial_data.files);
+ await _save_items(initial_data.resources, initial_data.mappings, ctx);
}
db = opened_db;