« 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.js38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/page/album.js b/src/page/album.js
index a92d9a0..1313bb3 100644
--- a/src/page/album.js
+++ b/src/page/album.js
@@ -290,10 +290,11 @@ export function write(album, {wikiData}) {
                     link.albumAdditionalFile({album, file}),
                 })),
 
-            ...album.commentary ? [
-              html.tag('p', language.$('releaseInfo.artistCommentary')),
-              html.tag('blockquote', transformMultiline(album.commentary)),
-            ] : [],
+            ...html.fragment(
+              album.commentary && [
+                html.tag('p', language.$('releaseInfo.artistCommentary')),
+                html.tag('blockquote', transformMultiline(album.commentary)),
+              ]),
           ],
         },
 
@@ -440,21 +441,22 @@ export function generateAlbumSidebar(album, currentTrack, {
           ),
         })),
 
-      ...isAlbumPage ? [
-        next &&
-          html.tag('p',
-            {class: 'group-chronology-link'},
-            language.$('albumSidebar.groupBox.next', {
-              album: link.album(next),
-            })),
+      ...html.fragment(
+        isAlbumPage && [
+          next &&
+            html.tag('p',
+              {class: 'group-chronology-link'},
+              language.$('albumSidebar.groupBox.next', {
+                album: link.album(next),
+              })),
 
-        previous &&
-          html.tag('p',
-            {class: 'group-chronology-link'},
-            language.$('albumSidebar.groupBox.previous', {
-              album: link.album(previous),
-            })),
-      ] : [],
+          previous &&
+            html.tag('p',
+              {class: 'group-chronology-link'},
+              language.$('albumSidebar.groupBox.previous', {
+                album: link.album(previous),
+              })),
+        ]),
     ]);
 
   if (groupParts.length) {