Skip to content

Build your personal knowledge base with Trilium Notes

fix(client): narrow the optional note ID when refusing a help-page drop

Elian Doran961b58ce998a
diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.ts
index c376e7d5fc..11dda7134a 100644
--- a/apps/client/src/widgets/note_tree.ts
+++ b/apps/client/src/widgets/note_tree.ts
@@ -582,7 +582,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
}
// Help pages are virtual notes, which the server never moves.
- if (notes.some((note) => note.noteId.startsWith("_help"))) {
+ if (notes.some((note) => note.noteId?.startsWith("_help"))) {
toastService.showError(t("note_tree.dropping-not-allowed"));
return;
}