From 536643ed3bedad412552128fbb95853ef581a50b Mon Sep 17 00:00:00 2001 From: Tom <7283497+thfrei@users.noreply.github.com> Date: Sun, 17 Apr 2022 21:58:28 +0200 Subject: [PATCH] add undefined check for branch unclear why this happens --- src/share/shaca/entities/attribute.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/share/shaca/entities/attribute.js b/src/share/shaca/entities/attribute.js index 1696312ab..4b486d6da 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; + } } }