fix exporting root note, closes #2346

(cherry picked from commit 20a187fab9)
This commit is contained in:
zadam 2021-11-15 21:23:19 +01:00
parent ed5eb5c6db
commit bc8b6284a6

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} */