mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 08:15:52 +01:00
fix exporting root note, closes #2346
(cherry picked from commit 20a187fab9)
This commit is contained in:
@@ -58,6 +58,9 @@ class Branch extends AbstractEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
this.becca.branches[this.branchId] = this;
|
||||||
|
this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;
|
||||||
|
|
||||||
if (this.branchId === 'root') {
|
if (this.branchId === 'root') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -76,9 +79,6 @@ class Branch extends AbstractEntity {
|
|||||||
if (!parentNote.children.includes(childNote)) {
|
if (!parentNote.children.includes(childNote)) {
|
||||||
parentNote.children.push(childNote);
|
parentNote.children.push(childNote);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.becca.branches[this.branchId] = this;
|
|
||||||
this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {Note} */
|
/** @returns {Note} */
|
||||||
|
|||||||
Reference in New Issue
Block a user