Skip to content

Build your personal knowledge base with Trilium Notes

Don't show protected notes in shared tree (#2704)

Matt77ce56ba8403
diff --git a/src/share/shaca/entities/note.js b/src/share/shaca/entities/note.js
index 220eceaa32..95b3d1f83a 100644
--- a/src/share/shaca/entities/note.js
+++ b/src/share/shaca/entities/note.js
@@ -59,7 +59,7 @@ class Note extends AbstractEntity {
}
getVisibleChildNotes() {
- return this.children.filter(childNote => !childNote.hasLabel('shareHiddenFromTree'));
+ return this.children.filter(childNote => !childNote.hasLabel('shareHiddenFromTree') && !childNote.isProtected);
}
hasChildren() {
@@ -67,7 +67,7 @@ class Note extends AbstractEntity {
}
hasVisibleChildren() {
- return this.children && !!this.children.find(childNote => !childNote.hasLabel('shareHiddenFromTree'));
+ return this.children && !!this.children.find(childNote => !childNote.hasLabel('shareHiddenFromTree') && !childNote.isProtected);
}
getChildBranches() {