fix(collections/list): excessive spacing in empty note content (closes #7319)

This commit is contained in:
Elian Doran
2025-10-23 08:16:26 +03:00
parent f5038a08e5
commit 347da8abde

View File

@@ -141,7 +141,11 @@ function NoteContent({ note, trim, noChildrenList, highlightedTokens }: { note:
}) })
.then(({ $renderedContent, type }) => { .then(({ $renderedContent, type }) => {
if (!contentRef.current) return; 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}`); contentRef.current.classList.add(`type-${type}`);
highlightSearch(contentRef.current); highlightSearch(contentRef.current);
}) })