From d98585fc84e49135dc103630c2c078848b6813bb Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 12 Apr 2025 18:29:09 -0300 Subject: content: generateAlbumArtInfoBox: restore chronology links ...by using the right contributions --- src/content/dependencies/generateAlbumArtInfoBox.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/content/dependencies') 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', }), -- cgit 1.3.0-6-gf8a5