mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
core: fix v5.8 backups not restoring due to changed item ids (#1303)
* core: back restore repaired due to version change Signed-off-by: Muhammad Ali <alihamuh@gmail.com>
This commit is contained in:
@@ -200,7 +200,7 @@ export default class Backup {
|
||||
await this._migrator.migrate(
|
||||
this._db,
|
||||
collections,
|
||||
(id) => data[id],
|
||||
(id, type) => (version < 5.8 ? data[id] : data[`${id}_${type}`]),
|
||||
version,
|
||||
true
|
||||
);
|
||||
|
||||
@@ -38,7 +38,7 @@ class Migrator {
|
||||
const index = (await collection.index()) || [];
|
||||
for (var i = 0; i < index.length; ++i) {
|
||||
let id = index[i];
|
||||
let item = get(id);
|
||||
let item = get(id, collection.dbCollection.collectionName);
|
||||
if (!item) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user