diff options
Diffstat (limited to 'common/indexeddb.js')
-rw-r--r-- | common/indexeddb.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/indexeddb.js b/common/indexeddb.js index cf38d23..1c6244b 100644 --- a/common/indexeddb.js +++ b/common/indexeddb.js @@ -111,7 +111,8 @@ async function perform_upgrade(event) { store = opened_db.createObjectStore(store_name, key_mode); const ctx = make_context(store.transaction, initial_data.file); - await _save_items(initial_data.resource, initial_data.mapping, [], ctx); + await _save_items(initial_data.resource, initial_data.mapping, + initial_data.repo || [], ctx); return opened_db; } @@ -312,8 +313,10 @@ async function _save_items(resources, mappings, repos, context) for (const item of resources.concat(mappings)) await save_item(item, context); - for (const repo_url of repos) + for (const repo_url of repos) { + broadcast.prepare(context.sender, "idb_changes_repo", repo_url); await idb_put(context.transaction, "repo", {url: repo_url}); + } await finalize_transaction(context); } |