Revision 5ed09841
Added by koszko over 1 year ago
| common/indexeddb.js | ||
|---|---|---|
| 111 | 111 |
store = opened_db.createObjectStore(store_name, key_mode); |
| 112 | 112 |
|
| 113 | 113 |
const ctx = make_context(store.transaction, initial_data.file); |
| 114 |
await _save_items(initial_data.resource, initial_data.mapping, [], ctx); |
|
| 114 |
await _save_items(initial_data.resource, initial_data.mapping, |
|
| 115 |
initial_data.repo || [], ctx); |
|
| 115 | 116 |
|
| 116 | 117 |
return opened_db; |
| 117 | 118 |
} |
| ... | ... | |
| 312 | 313 |
for (const item of resources.concat(mappings)) |
| 313 | 314 |
await save_item(item, context); |
| 314 | 315 |
|
| 315 |
for (const repo_url of repos) |
|
| 316 |
for (const repo_url of repos) {
|
|
| 317 |
broadcast.prepare(context.sender, "idb_changes_repo", repo_url); |
|
| 316 | 318 |
await idb_put(context.transaction, "repo", {url: repo_url});
|
| 319 |
} |
|
| 317 | 320 |
|
| 318 | 321 |
await finalize_transaction(context); |
| 319 | 322 |
} |
Also available in: Unified diff
fix loading initial data and verify it in automated tests