From 513689b175aa2531601ae213746dbbaa7c3b0518 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 12 Dec 2017 22:26:40 -0500 Subject: [PATCH] fix --- public/javascripts/note_tree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/javascripts/note_tree.js b/public/javascripts/note_tree.js index 393202a3f..d6a950902 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) {