Skip to content

Commit bb26413

Browse files
committed
Serialize the JSON keys so they're stable across backups. Fixes #4764.
1 parent 8a49edc commit bb26413

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pages/options.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,9 @@ const OptionsPage = {
317317

318318
onDownloadBackupClicked() {
319319
const backup = Settings.pruneOutDefaultValues(this.getSettingsFromForm());
320-
const settingsBlob = new Blob([JSON.stringify(backup, null, 2) + "\n"]);
320+
// Serialize the JSON keys so they're stable across backups. See #4764.
321+
const keys = Object.keys(backup).sort();
322+
const settingsBlob = new Blob([JSON.stringify(backup, keys, 2) + "\n"]);
321323
document.querySelector("#download-backup").href = URL.createObjectURL(settingsBlob);
322324
},
323325

0 commit comments

Comments
 (0)