« 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 12:43:26 -0300
commit680cc3acdcabfe8d765275a7f78c4b254670fe2e (patch)
treecd570c01c8a000c6de7ce4f844c49eda8015c109
parentb37d81240307f3e38faaa781c3932feff53e9aac (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);