test(server/share): included text notes

This commit is contained in:
Elian Doran
2025-09-28 15:07:10 +03:00
parent 1ad8b1bf85
commit 8b5e53e579
3 changed files with 35 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ export function renderText(result: Result, note: SNote) {
if (typeof includedResult.content !== "string") continue;
const includedDocument = new JSDOM(includedResult.content).window.document;
includeNoteEl.replaceWith(includedDocument.body);
includeNoteEl.replaceWith(...includedDocument.body.childNodes);
}
result.isEmpty = document.body.textContent?.trim().length === 0 && document.querySelectorAll("img").length === 0;