Skip to content

Build your personal knowledge base with Trilium Notes

fix

azivner513689b175aa
diff --git a/public/javascripts/note_tree.js b/public/javascripts/note_tree.js
index 393202a3f2..d6a950902d 100644
--- a/public/javascripts/note_tree.js
+++ b/public/javascripts/note_tree.js
@@ -78,7 +78,8 @@ const noteTree = (function() {
}
function getNodesByNoteId(noteId) {
- return getTree().getNodesByRef(noteId);
+ const list = getTree().getNodesByRef(noteId);
+ return list ? list : []; // if no nodes with this refKey are found, fancy tree returns null
}
function setPrefix(noteTreeId, prefix) {