« get me outta code hell

content: gAIPTracksChunkItem: fix nonsense .kind accesses - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-10 19:20:17 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:05 -0300
commit0f1015d84db262c6c3dee9ca853d8fe55632ec67 (patch)
tree3f79505f3af21d35a53d2ee2f8e4b7eefbd8fd21 /src/content
parent11fedacff412b4d5c00d084e8b7d9d2270896925 (diff)
content: gAIPTracksChunkItem: fix nonsense .kind accesses
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateArtistInfoPageTracksChunkItem.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js b/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js
index e7cba684..03ca2ef5 100644
--- a/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js
+++ b/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js
@@ -1,4 +1,5 @@
 import {empty} from '#sugar';
+import {isArtistContribution, isContributorContribution} from '#wiki-data';
 
 export default {
   contentDependencies: [
@@ -19,11 +20,11 @@ export default {
 
     const creditedAsArtist =
       contribs
-        .some(contrib => contrib.kind === 'artist');
+        .some(isArtistContribution);
 
     const creditedAsContributor =
       contribs
-        .some(contrib => contrib.kind === 'contributor');
+        .some(isContributorContribution);
 
     const annotatedContribs =
       contribs
@@ -31,11 +32,11 @@ export default {
 
     const annotatedArtistContribs =
       annotatedContribs
-        .filter(contrib => contrib.kind === 'artist');
+        .filter(isArtistContribution);
 
     const annotatedContributorContribs =
       annotatedContribs
-        .filter(contrib => contrib.kind === 'contributor');
+        .filter(isContributorContribution);
 
     // Don't display annotations associated with crediting in the
     // Contributors field if the artist is also credited as an Artist