chore(server): fix type error

This commit is contained in:
Elian Doran 2025-12-29 20:38:48 +02:00
parent f3cfa84d1d
commit d96528dae4
No known key found for this signature in database

View File

@ -168,10 +168,10 @@ function renderNoteContentInternal(note: SNote | BNote, renderArgs: RenderArgs)
// When rendering static share, non-protected JavaScript notes should be rendered as-is. // When rendering static share, non-protected JavaScript notes should be rendered as-is.
if (renderArgs.isStatic && note.mime.startsWith("application/javascript")) { if (renderArgs.isStatic && note.mime.startsWith("application/javascript")) {
if (note.isProtected) { if (note.isProtected) {
return `console.log("Protected note cannot be exported.");` return `console.log("Protected note cannot be exported.");`;
}; }
return note.getContent(); return note.getContent() ?? "";
} }
const { header, content, isEmpty } = getContent(note); const { header, content, isEmpty } = getContent(note);