diff --git a/src/public/app/services/main_tree_executors.js b/src/public/app/services/main_tree_executors.js index ab67e3368..239dba8b9 100644 --- a/src/public/app/services/main_tree_executors.js +++ b/src/public/app/services/main_tree_executors.js @@ -41,6 +41,11 @@ export default class MainTreeExecutors extends Component { async createNoteAfterCommand() { const node = this.tree.getActiveNode(); + + if (!node) { + return; + } + const parentNotePath = treeService.getNotePath(node.getParent()); const isProtected = await treeService.getParentProtectedStatus(node);