fix exporting root note, closes #2346

This commit is contained in:
zadam
2021-11-15 21:23:19 +01:00
parent 0b001f41c0
commit 20a187fab9
3 changed files with 134 additions and 151 deletions

View File

@@ -58,6 +58,9 @@ class Branch extends AbstractEntity {
}
init() {
this.becca.branches[this.branchId] = this;
this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;
if (this.branchId === 'root') {
return;
}
@@ -76,9 +79,6 @@ class Branch extends AbstractEntity {
if (!parentNote.children.includes(childNote)) {
parentNote.children.push(childNote);
}
this.becca.branches[this.branchId] = this;
this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;
}
/** @returns {Note} */