« get me outta code hell

content: pre-sort existing listings - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/listArtistsByCommentaryEntries.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-07-21 12:15:03 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-07-21 12:15:03 -0300
commit2912e0f77cf3f9f30c49c0ab22abecc9da6fb0db (patch)
treec4745b90f791169d60daa625a7fe82b2a92222cd /src/content/dependencies/listArtistsByCommentaryEntries.js
parentfa57fb3e3a0fd628e134fbe25102cbc3aa8a1c70 (diff)
content: pre-sort existing listings
Diffstat (limited to 'src/content/dependencies/listArtistsByCommentaryEntries.js')
-rw-r--r--src/content/dependencies/listArtistsByCommentaryEntries.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/content/dependencies/listArtistsByCommentaryEntries.js b/src/content/dependencies/listArtistsByCommentaryEntries.js
index eae6dd6..e3c7094 100644
--- a/src/content/dependencies/listArtistsByCommentaryEntries.js
+++ b/src/content/dependencies/listArtistsByCommentaryEntries.js
@@ -1,5 +1,9 @@
 import {stitchArrays} from '../../util/sugar.js';
-import {filterByCount, sortByCount} from '../../util/wiki-data.js';
+import {
+  filterByCount,
+  sortAlphabetically,
+  sortByCount,
+} from '../../util/wiki-data.js';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkArtist'],
@@ -10,7 +14,7 @@ export default {
   },
 
   query({artistData}, spec) {
-    const artists = artistData.slice();
+    const artists = sortAlphabetically(artistData.slice());
     const counts =
       artists.map(artist =>
         artist.tracksAsCommentator.length +