Skip to content

Build your personal knowledge base with Trilium Notes

fix context menu JS error on root note

azivner5b98c1c0f31a
diff --git a/src/public/javascripts/services/context_menu.js b/src/public/javascripts/services/context_menu.js
index 29a5fd5001..aaacca5424 100644
--- a/src/public/javascripts/services/context_menu.js
+++ b/src/public/javascripts/services/context_menu.js
@@ -121,7 +121,7 @@ const contextMenuOptions = {
$tree.contextmenu("enableEntry", "pasteInto", clipboardIds.length > 0 && note.type !== 'search');
$tree.contextmenu("enableEntry", "importBranch", note.type !== 'search');
$tree.contextmenu("enableEntry", "exportBranch", note.type !== 'search');
- $tree.contextmenu("enableEntry", "editBranchPrefix", parentNote.type !== 'search');
+ $tree.contextmenu("enableEntry", "editBranchPrefix", isNotRoot && parentNote.type !== 'search');
// Activate node on right-click
node.setActive();