branches in tree cache should always be loaded if some branchId reference exists

This commit is contained in:
zadam
2019-10-26 09:58:00 +02:00
parent ed9ecf2a57
commit d3c957768f
10 changed files with 25 additions and 43 deletions

View File

@@ -26,7 +26,7 @@ class TreeContextMenu {
}
async getContextMenuItems() {
const branch = await treeCache.getBranch(this.node.data.branchId);
const branch = treeCache.getBranch(this.node.data.branchId);
const note = await treeCache.getNote(this.node.data.noteId);
const parentNote = await treeCache.getNote(branch.parentNoteId);
const isNotRoot = note.noteId !== 'root';
@@ -156,7 +156,7 @@ class TreeContextMenu {
hoistedNoteService.unhoist();
}
else if (cmd === "duplicateNote") {
const branch = await treeCache.getBranch(this.node.data.branchId);
const branch = treeCache.getBranch(this.node.data.branchId);
treeService.duplicateNote(this.node.data.noteId, branch.parentNoteId);
}