From 45bc8a0240f145b4a9a72d76f7ca5ff5b734e82d Mon Sep 17 00:00:00 2001 From: Grigory Date: Sat, 9 Dec 2023 22:31:07 +0500 Subject: [PATCH] fix(wrapper): add optional chaining to `colorExtractor` (#2703) --- jsHelper/spicetifyWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsHelper/spicetifyWrapper.js b/jsHelper/spicetifyWrapper.js index 8bea655ba9..0288797c95 100644 --- a/jsHelper/spicetifyWrapper.js +++ b/jsHelper/spicetifyWrapper.js @@ -769,7 +769,7 @@ Spicetify.colorExtractor = async uri => { if (body.entries && body.entries.length) { const list = {}; for (const color of body.entries[0].color_swatches) { - list[color.preset] = `#${color.color.toString(16).padStart(6, "0")}`; + list[color.preset] = `#${color.color?.toString(16).padStart(6, "0")}`; } return list; } else {