Skip to content

Build your personal knowledge base with Trilium Notes

feat(export/zip): handle empty title for archive

Elian Doran86f6d9b14ad3
diff --git a/apps/server/src/services/export/zip.ts b/apps/server/src/services/export/zip.ts
index 9bfdae5c10..9d3e73d255 100644
--- a/apps/server/src/services/export/zip.ts
+++ b/apps/server/src/services/export/zip.ts
@@ -599,7 +599,7 @@ ${markdownContent}`;
}
const note = branch.getNote();
- const zipFileName = `${branch.prefix ? `${branch.prefix} - ` : ""}${note.getTitleOrProtected()}.zip`;
+ const zipFileName = `${branch.prefix ? `${branch.prefix} - ` : ""}${note.getTitleOrProtected() || "note"}.zip`;
if (setHeaders && "setHeader" in res) {
res.setHeader("Content-Disposition", getContentDisposition(zipFileName));