diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-12 18:15:50 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-18 22:56:10 -0300 |
commit | 564fc154fc74e48aeec1691d963b39c1910e63db (patch) | |
tree | 6e88cfb1170e8726bf386d86852871cce27aaaac | |
parent | 0b71d7f5005e83e7055173cbac8ebe9bbffab643 (diff) |
content: gAIPFlashesChunkedList: blank if flashes disabled
-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'), |