From 347da8abdecddaf997915c01ec76d9274ac5c0e3 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 23 Oct 2025 08:16:26 +0300 Subject: [PATCH] fix(collections/list): excessive spacing in empty note content (closes #7319) --- .../src/widgets/collections/legacy/ListOrGridView.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx index d29d7e275..2b5d1bdd0 100644 --- a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx +++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx @@ -141,7 +141,11 @@ function NoteContent({ note, trim, noChildrenList, highlightedTokens }: { note: }) .then(({ $renderedContent, type }) => { if (!contentRef.current) return; - contentRef.current.replaceChildren(...$renderedContent); + if ($renderedContent[0].innerHTML) { + contentRef.current.replaceChildren(...$renderedContent); + } else { + contentRef.current.replaceChildren(); + } contentRef.current.classList.add(`type-${type}`); highlightSearch(contentRef.current); })