core: fix topic with notes not deleting

This commit is contained in:
ammarahm-ed
2023-01-14 10:51:25 +05:00
parent c6efa3ba6c
commit 7f30fe6ff9

View File

@@ -56,9 +56,12 @@ export default class Topic {
const noteIds = this._db.notes.topicReferences.get(this.id);
if (!noteIds.length) return;
return this._db.notes.deleteFromNotebook(
this._notebookId,
this.id,
return this._db.notes.removeFromNotebook(
{
topic: this.id,
id: this._notebookId,
rebuildCache: true
},
...noteIds
);
}