Skip to content

Build your personal knowledge base with Trilium Notes

fix creating branch without isExpanded, fixes initial document initialization

zadamf1a7fce277d9
diff --git a/src/entities/branch.js b/src/entities/branch.js
index aa06c425b3..8c1b14d322 100644
--- a/src/entities/branch.js
+++ b/src/entities/branch.js
@@ -45,6 +45,10 @@ class Branch extends Entity {
this.notePosition = maxNotePos === null ? 0 : maxNotePos + 10;
}
+ if (!this.isExpanded) {
+ this.isExpanded = false;
+ }
+
if (!this.isDeleted) {
this.isDeleted = false;
}