mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 01:23:57 +08:00
Check for active node before create note in createNoteAfter (#2074)
This commit is contained in:
parent
adc98d4515
commit
7b129c7c34
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue