web: fix issue where notes directly in a notebook could not be unlinked (#2466)

Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
This commit is contained in:
Muhammad Ali
2023-05-02 12:49:24 +05:00
committed by GitHub
parent 5f6a38c8b1
commit 2d07d79057

View File

@@ -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);