From 2d07d790579156632c898dad73f2cabd20b394b3 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Tue, 2 May 2023 12:49:24 +0500 Subject: [PATCH] web: fix issue where notes directly in a notebook could not be unlinked (#2466) Co-authored-by: Abdullah Atta --- packages/core/collections/notes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/collections/notes.js b/packages/core/collections/notes.js index c04fdf66c..07df73bc4 100644 --- a/packages/core/collections/notes.js +++ b/packages/core/collections/notes.js @@ -347,11 +347,12 @@ export default class Notes extends Collection { for (const noteId of noteIds) { const note = this.note(noteId); - if (!note || note.deleted || !note.notebooks) { + if (!note || note.deleted) { continue; } if (topicId) { + if (!note.notebooks) continue; const { notebooks } = note; const notebook = findById(notebooks, notebookId);