Skip to content

Commit

Permalink
fix: if the color parser fails to generate a color, return the origin…
Browse files Browse the repository at this point in the history
…al value (#497)
  • Loading branch information
erautenberg authored Apr 5, 2024
1 parent 7fd99c9 commit 21759b2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ export const colorParser = (targetObject, styleObj) => {
return getValFromObjPath(targetObject, value); // If no theme value exists, the property will be removed from the object
} else if (Array.isArray(value) && value.length === 2) {
// Process value as a color ['#663399', 1]
return getHexColor(value[0], value[1]);
return getHexColor(value[0], value[1]) || value;
}
return value;
});
Expand Down

0 comments on commit 21759b2

Please sign in to comment.