diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generateArtistInfoPageFlashesChunkedList.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageFlashesChunkedList.js b/src/content/dependencies/generateArtistInfoPageFlashesChunkedList.js index a0eba8ff..b347faf5 100644 --- a/src/content/dependencies/generateArtistInfoPageFlashesChunkedList.js +++ b/src/content/dependencies/generateArtistInfoPageFlashesChunkedList.js @@ -8,12 +8,22 @@ export default { 'generateArtistInfoPageFlashesChunk', ], - query(artist) { + extraDependencies: ['wikiData'], + + sprawl: ({wikiInfo}) => ({ + enableFlashesAndGames: + wikiInfo.enableFlashesAndGames, + }), + + query(sprawl, artist) { const query = {}; - const allContributions = [ - ...artist.flashContributorContributions, - ]; + const allContributions = + (sprawl.enableFlashesAndGames + ? [ + ...artist.flashContributorContributions, + ] + : []); sortContributionsChronologically( allContributions, @@ -33,7 +43,7 @@ export default { return query; }, - relations: (relation, query, _artist) => ({ + relations: (relation, query, _sprawl, _artist) => ({ chunkedList: relation('generateArtistInfoPageChunkedList'), |