« get me outta code hell

content, page, util: general contributions usage cleanup - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateAlbumInfoPage.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-06-02 10:55:38 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:06 -0300
commit4aa153ebae1360e390b9d372fabf457ee8b21705 (patch)
treea1cff366b439550227fa6ef7b9b4f6c575e51daf /src/content/dependencies/generateAlbumInfoPage.js
parent5550f8ec487c3cae87de36f4e0c1fe9d6df8e36c (diff)
content, page, util: general contributions usage cleanup
Diffstat (limited to 'src/content/dependencies/generateAlbumInfoPage.js')
-rw-r--r--src/content/dependencies/generateAlbumInfoPage.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js
index d4ea52de..02854a16 100644
--- a/src/content/dependencies/generateAlbumInfoPage.js
+++ b/src/content/dependencies/generateAlbumInfoPage.js
@@ -56,10 +56,13 @@ export default {
         getThings(artist) {
           const getDate = thing => thing.coverArtDate ?? thing.date;
 
-          const things = [
-            ...artist.albumsAsCoverArtist,
-            ...artist.tracksAsCoverArtist,
-          ].filter(getDate);
+          const things =
+            ([
+              artist.albumCoverArtistContributions,
+              artist.trackCoverArtistContributions,
+            ]).flat()
+              .map(({thing}) => thing)
+              .filter(getDate);
 
           return sortAlbumsTracksChronologically(things, {getDate});
         },