Deterministic Collection Sort never did anything for folders or tables...

This commit is contained in:
zkldi
2021-12-09 21:26:18 +00:00
parent 39135df021
commit e08ea43db1
2 changed files with 10 additions and 2 deletions
@@ -27,9 +27,16 @@ function DeterministicCollectionSort() {
if (collection.startsWith("charts-")) {
content.sort(ChartSort);
}
if (collection.startsWith("songs-")) {
else if (collection.startsWith("songs-")) {
content.sort((a, b) => a.id - b.id);
}
else if (collection.startsWith("folders")) {
content.sort((a, b) => a.folderID.localeCompare(b.folderID));
}
else if (collection.startsWith("folders")) {
content.sort((a, b) => a.tableID.localeCompare(b.tableID));
}
content = content.map(SortObjectKeys);
+2 -1
View File
@@ -50,9 +50,10 @@ if (options.all) {
await ExportCollection(collection);
}
DeterministicCollectionSort();
RemoveUnderscoreID();
DeterministicCollectionSort();
logger.info(`Done!`);
process.exit(0);