fix: delete delta with note

This commit is contained in:
thecodrr
2020-02-05 01:38:13 +05:00
parent 2981fe35e2
commit 35a23a6f6d
2 changed files with 2 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ test("delete note", () =>
expect(topic.all.findIndex(v => v.id === id)).toBeGreaterThan(-1);
await db.notes.delete(id);
let note = db.notes.get(id);
expect(await db.notes.delta(id)).toBeUndefined();
expect(note).toBeUndefined();
expect(topic.all.findIndex(v => v.id === id)).toBe(-1);
}));

View File

@@ -176,6 +176,7 @@ export default class Notes {
await this.tagsCollection.remove(tag);
}
await this.collection.removeItem(id);
this.deltaStorage.remove(id + "_delta");
}
}