From 7f30fe6ff9d7d7a918ea8edf37259b272fd0dc46 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Sat, 14 Jan 2023 10:51:25 +0500 Subject: [PATCH] core: fix topic with notes not deleting --- packages/core/models/topic.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/core/models/topic.js b/packages/core/models/topic.js index c67d0c21d..32c868292 100644 --- a/packages/core/models/topic.js +++ b/packages/core/models/topic.js @@ -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 ); }