mirror of
https://github.com/zadam/trilium.git
synced 2024-09-22 16:46:09 +08:00
fix exporting root note, closes #2346
(cherry picked from commit 20a187fab9
)
This commit is contained in:
parent
ed5eb5c6db
commit
bc8b6284a6
|
@ -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} */
|
||||
|
|
Loading…
Reference in a new issue