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
commit 37baa4cd74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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');