From bafab2d6b9340b80e4d599680abd576047d3416d Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Tue, 10 Oct 2023 15:07:26 -0700 Subject: [PATCH] fix: more conditional access checks --- src/_data/music.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_data/music.js b/src/_data/music.js index c335a9b1..4acf3982 100644 --- a/src/_data/music.js +++ b/src/_data/music.js @@ -41,7 +41,7 @@ module.exports = async function () { }) .then((data) => data.json()) .catch() - res = tracks['data'].length ? [...res, ...tracks['data']] : [...res] + res = tracks['data']?.length ? [...res, ...tracks['data']] : [...res] CURRENT_PAGE++ }