mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
core: fix indexes getting replaced on backup restore
This commit is contained in:
committed by
Abdullah Atta
parent
bd238a6fe4
commit
4c7cd840df
@@ -255,9 +255,9 @@ export default class Backup {
|
||||
}
|
||||
|
||||
for (const collectionKey in toAdd) {
|
||||
await new Indexer(this._db.storage, collectionKey).writeMulti(
|
||||
toAdd[collectionKey]
|
||||
);
|
||||
const indexer = new Indexer(this._db.storage, collectionKey);
|
||||
await indexer.init();
|
||||
await indexer.writeMulti(toAdd[collectionKey]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user