Merge pull request #4550 from spasche/zip-export-sort-children

sort children during export to ensure a more stable format
This commit is contained in:
zadam
2024-01-07 22:38:14 +01:00
committed by GitHub

View File

@@ -181,6 +181,8 @@ async function exportToZip(taskContext, branch, format, res, setHeaders = true)
noteIdToMeta[note.noteId] = meta; noteIdToMeta[note.noteId] = meta;
// sort children for having a stable / reproducible export format
note.sortChildren();
const childBranches = note.getChildBranches() const childBranches = note.getChildBranches()
.filter(branch => branch.noteId !== '_hidden'); .filter(branch => branch.noteId !== '_hidden');