« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--upd8.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/upd8.js b/upd8.js
index 70570c7b..d99b64cf 100644
--- a/upd8.js
+++ b/upd8.js
@@ -1334,12 +1334,11 @@ async function writeAlbumPage(album) {
                 </p>
                 ${album.urls.length && `<p>Listen on ${joinNoOxford(album.urls.map(url => fancifyURL(url, {album: true})), 'or')}.</p>` || `<!-- (here: Listen on...) -->`}
                 ${album.usesGroups ? fixWS`
-                    <p>This album listing is divided into groups:</p>
                     <dl class="album-group-list">
                         ${album.tracks.flatMap((track, i, arr) => [
                             (i > 0 && track.group !== arr[i - 1].group) && `</${listTag}></dd>`,
                             (i === 0 || track.group !== arr[i - 1].group) && fixWS`
-                                <dt>${track.group}:</dt>
+                                ${track.group && `<dt>${track.group}:</dt>`}
                                 <dd><${listTag}>
                             `,
                             trackToListItem(track),
@@ -2450,7 +2449,7 @@ function generateSidebarForAlbum(album, currentTrack = null) {
                 ${album.tracks.flatMap((track, i, arr) => [
                     (i > 0 && track.group !== arr[i - 1].group) && `</${listTag}></dd>`,
                     (i === 0 || track.group !== arr[i - 1].group) && fixWS`
-                        <dt style="${getThemeString(track)}" ${classes(currentTrack && track.group === currentTrack.group && 'current')}><a href="${C.TRACK_DIRECTORY}/${track.directory}/index.html">${track.group}</a></dt>
+                        ${track.group && `<dt style="${getThemeString(track)}" ${classes(currentTrack && track.group === currentTrack.group && 'current')}><a href="${C.TRACK_DIRECTORY}/${track.directory}/index.html">${track.group}</a></dt>`}
                         <dd><${listTag}>
                     `,
                     (currentTrack && track.group === currentTrack.group) && trackToListItem(track),