« get me outta code hell

content: generateWikiHomeAlbumsRow: handle no names in carousel - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-13 16:36:36 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-13 16:36:36 -0400
commit52cc83065f41472a4c32c2003b0a715a66d4739a (patch)
treee3f13a3b5b355474c9f3dc351d0d9685b41f2161 /src
parent61c8aa5c17ee6fd96f2e72f8d8a47eb0878ffa7e (diff)
content: generateWikiHomeAlbumsRow: handle no names in carousel
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/generateWikiHomeAlbumsRow.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/content/dependencies/generateWikiHomeAlbumsRow.js b/src/content/dependencies/generateWikiHomeAlbumsRow.js
index 2c6a147e..a19f104c 100644
--- a/src/content/dependencies/generateWikiHomeAlbumsRow.js
+++ b/src/content/dependencies/generateWikiHomeAlbumsRow.js
@@ -108,14 +108,15 @@ export default {
       stitchArrays({
         image: relations.images,
         path: data.paths,
-        name: data.names,
+        name: data.names ?? data.paths.slice().fill(null),
       }).map(({image, path, name}) =>
           image.slots({
             path,
             missingSourceContent:
-              language.$('misc.albumGrid.noCoverArt', {
-                album: name,
-              }),
+              name &&
+                language.$('misc.albumGrid.noCoverArt', {
+                  album: name,
+                }),
             }));
 
     commonSlots.actionLinks =