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

This commit is contained in:
Elian Doran 2025-07-02 22:28:03 +03:00
parent 4f46d81e1b
commit 5270cf6284
No known key found for this signature in database

View File

@ -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) {