« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/album.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/page/album.js')
-rw-r--r--src/page/album.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/page/album.js b/src/page/album.js
index 70320b2..eac0a9f 100644
--- a/src/page/album.js
+++ b/src/page/album.js
@@ -118,6 +118,8 @@ export function write(album, {wikiData}) {
                 strings
             });
 
+            const cover = getAlbumCover(album);
+
             return {
                 title: strings('albumPage.title', {album: album.name}),
                 stylesheet: getAlbumStylesheet(album),
@@ -134,8 +136,8 @@ export function write(album, {wikiData}) {
 
                 main: {
                     content: fixWS`
-                        ${generateCoverLink({
-                            src: getAlbumCover(album),
+                        ${cover && generateCoverLink({
+                            src: cover,
                             alt: strings('misc.alt.albumCover'),
                             tags: album.artTags
                         })}