From 0f1015d84db262c6c3dee9ca853d8fe55632ec67 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 10 Apr 2024 19:20:17 -0300 Subject: content: gAIPTracksChunkItem: fix nonsense .kind accesses --- .../dependencies/generateArtistInfoPageTracksChunkItem.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit 1.3.0-6-gf8a5