mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix: delete delta with note
This commit is contained in:
@@ -45,6 +45,7 @@ test("delete note", () =>
|
|||||||
expect(topic.all.findIndex(v => v.id === id)).toBeGreaterThan(-1);
|
expect(topic.all.findIndex(v => v.id === id)).toBeGreaterThan(-1);
|
||||||
await db.notes.delete(id);
|
await db.notes.delete(id);
|
||||||
let note = db.notes.get(id);
|
let note = db.notes.get(id);
|
||||||
|
expect(await db.notes.delta(id)).toBeUndefined();
|
||||||
expect(note).toBeUndefined();
|
expect(note).toBeUndefined();
|
||||||
expect(topic.all.findIndex(v => v.id === id)).toBe(-1);
|
expect(topic.all.findIndex(v => v.id === id)).toBe(-1);
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ export default class Notes {
|
|||||||
await this.tagsCollection.remove(tag);
|
await this.tagsCollection.remove(tag);
|
||||||
}
|
}
|
||||||
await this.collection.removeItem(id);
|
await this.collection.removeItem(id);
|
||||||
|
this.deltaStorage.remove(id + "_delta");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user