From 891728dd019884a69517820aadabed41206e9c1b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 5 Apr 2024 16:40:30 -0300 Subject: content: generateAlbumSecondaryNav: don't crash on dateless tracks --- src/content/dependencies/generateAlbumSecondaryNav.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit 1.3.0-6-gf8a5