From cc0fc2bbbe9ef0ec3966511ce365ab622cd6cd4f 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(-) (limited to 'src/content/dependencies') 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