Skip to content

Build your personal knowledge base with Trilium Notes

chore(server): fix type error

Elian Dorand96528dae4d3
diff --git a/apps/server/src/share/content_renderer.ts b/apps/server/src/share/content_renderer.ts
index 465d991961..4f9646e824 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);