diff --git a/apps/server/src/share/content_renderer.ts b/apps/server/src/share/content_renderer.ts index b217560a3..cb2a9aaa6 100644 --- a/apps/server/src/share/content_renderer.ts +++ b/apps/server/src/share/content_renderer.ts @@ -149,11 +149,11 @@ interface RenderArgs { } 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) { - // TODO: how to handle this case here? - throw new Error(`note ${note.noteId} is protected and cannot be exported`); - } + return `console.log("Protected note cannot be exported.");` + }; return note.getContent(); }