Skip to content

Build your personal knowledge base with Trilium Notes

add undefined check for branch

Tom536643ed3bed
diff --git a/src/share/shaca/entities/attribute.js b/src/share/shaca/entities/attribute.js
index 1696312abf..4b486d6da4 100644
--- a/src/share/shaca/entities/attribute.js
+++ b/src/share/shaca/entities/attribute.js
@@ -36,7 +36,13 @@ class Attribute extends AbstractEntity {
if (linkedChildNote) {
const branch = this.shaca.getBranchFromChildAndParent(linkedChildNote.noteId, this.noteId);
- branch.isHidden = true;
+ /**
+ * FIXME: why can we have branch is undefined? issue when
+ * sharing and not sharing notes? canvas-note specific?
+ */
+ if(branch) {
+ branch.isHidden = true;
+ }
}
}