idb-bridge: fix indexes when restoring from dump

This commit is contained in:
Florian Dold 2021-12-23 11:41:45 +01:00
parent a4e65c462a
commit b8200de6f6
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -330,9 +330,8 @@ export class MemoryBackend implements Backend {
originalData: new BTree([], compareKeys), originalData: new BTree([], compareKeys),
originalName: indexName, originalName: indexName,
}; };
const storeData = objectStoreData; objectStore.committedIndexes[indexName] = newIndex;
objectStoreData.forEach((v, k) => {
storeData.forEach((v, k) => {
try { try {
this.insertIntoIndex(newIndex, k, v.value, indexSchema); this.insertIntoIndex(newIndex, k, v.value, indexSchema);
} catch (e) { } catch (e) {