Skip to content

Commit

Permalink
fix(wrapper): add optional chaining to colorExtractor (#2703)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila authored Dec 9, 2023
1 parent 7c589c9 commit 45bc8a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 45bc8a0

Please sign in to comment.