« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/artist.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/page/artist.js')
-rw-r--r--src/page/artist.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/page/artist.js b/src/page/artist.js
index b68cf05c..257e060d 100644
--- a/src/page/artist.js
+++ b/src/page/artist.js
@@ -8,10 +8,6 @@ export function targets({wikiData}) {
 }
 
 export function pathsForTarget(artist) {
-  const hasGalleryPage =
-    !empty(artist.albumCoverArtistContributions) ||
-    !empty(artist.trackCoverArtistContributions);
-
   return [
     {
       type: 'page',
@@ -23,10 +19,14 @@ export function pathsForTarget(artist) {
       },
     },
 
-    hasGalleryPage && {
+    {
       type: 'page',
       path: ['artistGallery', artist.directory],
 
+      condition: () =>
+        !empty(artist.albumCoverArtistContributions) ||
+        !empty(artist.trackCoverArtistContributions),
+
       contentFunction: {
         name: 'generateArtistGalleryPage',
         args: [artist],