diff options
author | Florian Dold <florian@dold.me> | 2021-12-23 11:41:45 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-12-23 11:42:25 +0100 |
commit | b8200de6f6c5ab9be3ff9f556c8acda013e574c3 (patch) | |
tree | 194659116a8156d5951a766d281ff3b4361a12a0 /packages | |
parent | a4e65c462ab71244eff01d7d172866ab71709143 (diff) |
idb-bridge: fix indexes when restoring from dump
Diffstat (limited to 'packages')
-rw-r--r-- | packages/idb-bridge/src/MemoryBackend.ts | 5 |
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) { |