From 8b7596f45cd1874565c403be10c6fd4a4753fc9e Mon Sep 17 00:00:00 2001 From: ririxi Date: Mon, 9 Sep 2024 01:20:08 +0200 Subject: [PATCH] fix(homeConfig): check if `uri` exists too --- jsHelper/homeConfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsHelper/homeConfig.js b/jsHelper/homeConfig.js index a9c5b3b94e..59fc1db80d 100644 --- a/jsHelper/homeConfig.js +++ b/jsHelper/homeConfig.js @@ -21,7 +21,7 @@ SpicetifyHomeConfig = {}; const stickSections = []; const lowSections = []; for (const uri of stickList) { - const index = sections.findIndex((a) => a?.uri === uri || a?.item.uri === uri); + const index = sections.findIndex((a) => a?.uri === uri || a?.item?.uri === uri); if (index !== -1) { const item = sections[index]; const uri = item.item.uri || item.uri; @@ -31,7 +31,7 @@ SpicetifyHomeConfig = {}; } } for (const uri of lowList) { - const index = sections.findIndex((a) => a?.uri === uri || a?.item.uri === uri); + const index = sections.findIndex((a) => a?.uri === uri || a?.item?.uri === uri); if (index !== -1) { const item = sections[index]; const uri = item.item.uri || item.uri;