diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-12 18:15:50 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-12 18:15:50 -0300 |
commit | 456dd2cf58f87a09ce3efb8570727055e6236e4d (patch) | |
tree | 16758d3797c3c18f044c220ce04f8f8f63d730f0 /src/content | |
parent | 0e2535a3439f3ee3a3e4b29ed4bd74c0065d8838 (diff) |
content: gAIPFlashesChunkedList: blank if flashes disabled
Diffstat (limited to 'src/content')
-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'), |