mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
Check for active node before create note in createNoteAfter (#2074)
This commit is contained in:
@@ -41,6 +41,11 @@ export default class MainTreeExecutors extends Component {
|
|||||||
|
|
||||||
async createNoteAfterCommand() {
|
async createNoteAfterCommand() {
|
||||||
const node = this.tree.getActiveNode();
|
const node = this.tree.getActiveNode();
|
||||||
|
|
||||||
|
if (!node) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const parentNotePath = treeService.getNotePath(node.getParent());
|
const parentNotePath = treeService.getNotePath(node.getParent());
|
||||||
const isProtected = await treeService.getParentProtectedStatus(node);
|
const isProtected = await treeService.getParentProtectedStatus(node);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user