fix(client/search): collection rendering twice

This commit is contained in:
Elian Doran
2025-10-20 16:05:24 +03:00
parent 44c379fce1
commit e904feb179
2 changed files with 6 additions and 4 deletions

View File

@@ -326,9 +326,11 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
}
// Collections must always display a note list, even if no children.
const viewType = note.getLabelValue("viewType") ?? "grid";
if (!["list", "grid"].includes(viewType)) {
return true;
if (note.type === "book") {
const viewType = note.getLabelValue("viewType") ?? "grid";
if (!["list", "grid"].includes(viewType)) {
return true;
}
}
if (!note.hasChildren()) {