« get me outta code hell

content: generateAlbumCommentaryPage: don't break for coverless album - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-06 09:13:35 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-08 09:13:32 -0300
commit0c381968ff2dda64b96e4785e3077c880a662c61 (patch)
tree442618b881e630767bf475f3efabacb1d6dfb291
parent6131b00de75ae14aaf11cdaa65f0cd663ebc4a3a (diff)
content: generateAlbumCommentaryPage: don't break for coverless album
-rw-r--r--src/content/dependencies/generateAlbumCommentaryPage.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/content/dependencies/generateAlbumCommentaryPage.js b/src/content/dependencies/generateAlbumCommentaryPage.js
index 5c057b80..2982b037 100644
--- a/src/content/dependencies/generateAlbumCommentaryPage.js
+++ b/src/content/dependencies/generateAlbumCommentaryPage.js
@@ -33,8 +33,10 @@ export default {
       relation('generateAlbumNavAccent', album, null);
 
     if (album.commentary) {
-      relations.albumCommentaryCover =
-        relation('generateAlbumCoverArtwork', album);
+      if (album.hasCoverArt) {
+        relations.albumCommentaryCover =
+          relation('generateAlbumCoverArtwork', album);
+      }
 
       relations.albumCommentaryContent =
         relation('transformContent', album.commentary);