aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-12-23 11:41:45 +0100
committerFlorian Dold <florian@dold.me>2021-12-23 11:42:25 +0100
commitb8200de6f6c5ab9be3ff9f556c8acda013e574c3 (patch)
tree194659116a8156d5951a766d281ff3b4361a12a0 /packages
parenta4e65c462ab71244eff01d7d172866ab71709143 (diff)
idb-bridge: fix indexes when restoring from dump
Diffstat (limited to 'packages')
-rw-r--r--packages/idb-bridge/src/MemoryBackend.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/idb-bridge/src/MemoryBackend.ts b/packages/idb-bridge/src/MemoryBackend.ts
index 362b1cbc1..c1a1c12ea 100644
--- a/packages/idb-bridge/src/MemoryBackend.ts
+++ b/packages/idb-bridge/src/MemoryBackend.ts
@@ -330,9 +330,8 @@ export class MemoryBackend implements Backend {
originalData: new BTree([], compareKeys),
originalName: indexName,
};
- const storeData = objectStoreData;
-
- storeData.forEach((v, k) => {
+ objectStore.committedIndexes[indexName] = newIndex;
+ objectStoreData.forEach((v, k) => {
try {
this.insertIntoIndex(newIndex, k, v.value, indexSchema);
} catch (e) {