Skip to content

Build your personal knowledge base with Trilium Notes

fix(collections): displaying note list even if session is not unlocked

Elian Doran9e99670b19a8
diff --git a/apps/client/src/components/note_context.ts b/apps/client/src/components/note_context.ts
index afcaaf0918..3ca6a2a792 100644
--- a/apps/client/src/components/note_context.ts
+++ b/apps/client/src/components/note_context.ts
@@ -381,6 +381,10 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
// Collections must always display a note list, even if no children.
if (note.type === "book") {
+ if (note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable()) {
+ return false;
+ }
+
const viewType = note.getLabelValue("viewType") ?? "grid";
if (!["list", "grid"].includes(viewType)) {
return true;