Check for active node before create note in createNoteAfter (#2074)

This commit is contained in:
Abitofevrything 2021-07-21 20:19:17 +02:00 committed by GitHub
parent adc98d4515
commit 7b129c7c34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);