« get me outta code hell

content: generateAlbumArtInfoBox: restore chronology links - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-04-12 18:29:09 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-04-12 18:29:40 -0300
commitd98585fc84e49135dc103630c2c078848b6813bb (patch)
tree8b1734754c53da9d6c06122e124616dee312474e /src/content
parent3cd9dbfd285ad27a22d34af99bf0aa271eec45a7 (diff)
content: generateAlbumArtInfoBox: restore chronology links
...by using the right contributions
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateAlbumArtInfoBox.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/content/dependencies/generateAlbumArtInfoBox.js b/src/content/dependencies/generateAlbumArtInfoBox.js
index f0bfd1b6..8c44c930 100644
--- a/src/content/dependencies/generateAlbumArtInfoBox.js
+++ b/src/content/dependencies/generateAlbumArtInfoBox.js
@@ -4,12 +4,16 @@ export default {
 
   relations: (relation, album) => ({
     wallpaperArtistContributionsLine:
-      relation('generateReleaseInfoContributionsLine',
-        album.wallpaperArtistContribs),
+      (album.wallpaperArtwork
+        ? relation('generateReleaseInfoContributionsLine',
+            album.wallpaperArtwork.artistContribs)
+        : null),
 
     bannerArtistContributionsLine:
-      relation('generateReleaseInfoContributionsLine',
-        album.bannerArtistContribs),
+      (album.bannerArtwork
+        ? relation('generateReleaseInfoContributionsLine',
+            album.bannerArtwork.artistContribs)
+        : null),
   }),
 
   generate: (relations, {html, language}) =>
@@ -22,12 +26,12 @@ export default {
           {[html.joinChildren]: html.tag('br')},
 
           [
-            relations.wallpaperArtistContributionsLine.slots({
+            relations.wallpaperArtistContributionsLine?.slots({
               stringKey: capsule + '.wallpaperArtBy',
               chronologyKind: 'wallpaperArt',
             }),
 
-            relations.bannerArtistContributionsLine.slots({
+            relations.bannerArtistContributionsLine?.slots({
               stringKey: capsule + '.bannerArtBy',
               chronologyKind: 'bannerArt',
             }),