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

@@ -11,7 +11,7 @@ async function prepareTree() {
let hoistedBranch;
if (hoistedNoteId === 'root') {
hoistedBranch = await treeCache.getBranch('root');
hoistedBranch = treeCache.getBranch('root');
}
else {
const hoistedNote = await treeCache.getNote(hoistedNoteId);
@@ -116,7 +116,7 @@ async function prepareSearchBranch(note) {
await treeCache.getNotes(results.map(res => res.noteId));
for (const result of results) {
const origBranch = await treeCache.getBranch(result.branchId);
const origBranch = treeCache.getBranch(result.branchId);
const branch = new Branch(treeCache, {
branchId: "virt" + utils.randomString(10),