From 5270cf6284fcead42b35224256ac5439f8fb3f5b Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 2 Jul 2025 22:28:03 +0300 Subject: [PATCH] feat(export/zip): handle empty notes for subtree --- apps/server/src/services/export/zip.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/server/src/services/export/zip.ts b/apps/server/src/services/export/zip.ts index a487d0b7f..9bfdae5c1 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 { 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) {