Skip to content

Commit

Permalink
Merge pull request #4550 from spasche/zip-export-sort-children
Browse files Browse the repository at this point in the history
sort children during export to ensure a more stable format
  • Loading branch information
zadam committed Jan 7, 2024
2 parents 68e03c4 + cb523fa commit 37baa4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/export/zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ async function exportToZip(taskContext, branch, format, res, setHeaders = true)

noteIdToMeta[note.noteId] = meta;

// sort children for having a stable / reproducible export format
note.sortChildren();
const childBranches = note.getChildBranches()
.filter(branch => branch.noteId !== '_hidden');

Expand Down

0 comments on commit 37baa4c

Please sign in to comment.