mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
Check for active node before create note in createNoteAfter (#2074)
This commit is contained in:
parent
adc98d4515
commit
7b129c7c34
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user