Skip to content

Build your personal knowledge base with Trilium Notes

feat(export/zip): handle empty notes for subtree

Elian Doran5270cf6284fc
diff --git a/apps/server/src/services/export/zip.ts b/apps/server/src/services/export/zip.ts
index a487d0b7f0..9bfdae5c10 100644
--- a/apps/server/src/services/export/zip.ts
+++ b/apps/server/src/services/export/zip.ts
@@ -75,6 +75,9 @@ async function exportToZip(taskContext: TaskContext, branch: BBranch, format: "h
function getDataFileName(type: string | null, mime: string, baseFileName: string, existingFileNames: Record<string, number>): string {
let fileName = baseFileName.trim();
+ if (!fileName) {
+ fileName = "note";
+ }
// Crop fileName to avoid its length exceeding 30 and prevent cutting into the extension.
if (fileName.length > 30) {