« get me outta code hell

content: genreateListRandomPageLinksGroupSection: explicit sort - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-13 23:43:20 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-13 23:43:20 -0300
commit1aec864eb848510ac85e94bc5a989ace95104f4f (patch)
treefd635f8ae0e52e6dd5f50018cd789be2db31ddbb
parent22aecb3c3acbb720b994a835aa8b0dff8382a3ae (diff)
content: genreateListRandomPageLinksGroupSection: explicit sort
-rw-r--r--src/content/dependencies/generateListRandomPageLinksGroupSection.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content/dependencies/generateListRandomPageLinksGroupSection.js b/src/content/dependencies/generateListRandomPageLinksGroupSection.js
index 9a46e2c3..006ebdf9 100644
--- a/src/content/dependencies/generateListRandomPageLinksGroupSection.js
+++ b/src/content/dependencies/generateListRandomPageLinksGroupSection.js
@@ -1,4 +1,5 @@
 import {stitchArrays} from '../../util/sugar.js';
+import {sortChronologically} from '../../util/wiki-data.js';
 
 export default {
   contentDependencies: ['generateColorStyleVariables', 'linkGroup'],
@@ -8,7 +9,7 @@ export default {
 
   query: (sprawl, group) => ({
     albums:
-      sprawl.albumData
+      sortChronologically(sprawl.albumData.slice())
         .filter(album => album.groups.includes(group)),
   }),