From cb523faaadbdfa5ca38eb350fb9038db619a6ea5 Mon Sep 17 00:00:00 2001 From: Sylvain Pasche Date: Sun, 31 Dec 2023 16:52:19 +0100 Subject: [PATCH] sort children during export to ensure a more stable format --- src/services/export/zip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/export/zip.js b/src/services/export/zip.js index 0e6b11e46a..dba7338d30 100644 --- a/src/services/export/zip.js +++ b/src/services/export/zip.js @@ -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');