« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateArtistInfoPageFlashesChunkedList.js20
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'),