From 2912e0f77cf3f9f30c49c0ab22abecc9da6fb0db Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 21 Jul 2023 12:15:03 -0300 Subject: content: pre-sort existing listings --- src/content/dependencies/listArtistsByCommentaryEntries.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/content/dependencies/listArtistsByCommentaryEntries.js') diff --git a/src/content/dependencies/listArtistsByCommentaryEntries.js b/src/content/dependencies/listArtistsByCommentaryEntries.js index eae6dd6e..e3c70940 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 + -- cgit 1.3.0-6-gf8a5