diff --git a/apps/server/src/share/content_renderer.ts b/apps/server/src/share/content_renderer.ts index 465d99196..4f9646e82 100644 --- a/apps/server/src/share/content_renderer.ts +++ b/apps/server/src/share/content_renderer.ts @@ -168,10 +168,10 @@ function renderNoteContentInternal(note: SNote | BNote, renderArgs: RenderArgs) // When rendering static share, non-protected JavaScript notes should be rendered as-is. if (renderArgs.isStatic && note.mime.startsWith("application/javascript")) { 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);