« get me outta code hell

content: generateAlbumSecondaryNav: don't crash on dateless tracks - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-05 16:40:30 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-01 07:06:03 -0300
commit891728dd019884a69517820aadabed41206e9c1b (patch)
tree1f4c5f1d93ac77ede6ea873f79b08c94b4aeae9c /src/content
parent788546b9de7ac5972d749a22c8851f90057ef5e3 (diff)
content: generateAlbumSecondaryNav: don't crash on dateless tracks
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateAlbumSecondaryNav.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content/dependencies/generateAlbumSecondaryNav.js b/src/content/dependencies/generateAlbumSecondaryNav.js
index 400420ba..9b9380e2 100644
--- a/src/content/dependencies/generateAlbumSecondaryNav.js
+++ b/src/content/dependencies/generateAlbumSecondaryNav.js
@@ -102,7 +102,7 @@ export default {
   generate(relations, slots, {html, language}) {
     const navLinksShouldShowPreviousNext =
       (slots.mode === 'track'
-        ? Array.from(relations.previousNextLinks, () => false)
+        ? Array.from(relations.previousNextLinks ?? [], () => false)
         : stitchArrays({
             previousAlbumLink: relations.previousAlbumLinks ?? null,
             nextAlbumLink: relations.nextAlbumLinks ?? null,