Skip to content

Commit 7849eb2

Browse files
authored
fix(getStyledClassName): remove $ from childrenProps (#2979)
1 parent 43c3b8b commit 7849eb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jsHelper/spicetifyWrapper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,8 @@ Spicetify._getStyledClassName = (args, component) => {
10291029
const childrenProps = ["iconLeading", "iconTrailing", "iconOnly", "$iconOnly", "$iconLeading", "$iconTrailing"];
10301030

10311031
for (const key of childrenProps) {
1032-
if (element[key]) className += `-${key}`;
1032+
const sanitizedKey = key.startsWith("$") ? key.slice(1) : key;
1033+
if (element[key]) className += `-${sanitizedKey}`;
10331034
}
10341035

10351036
const booleanKeys = Object.keys(element).filter(key => typeof element[key] === "boolean" && element[key]);

0 commit comments

Comments
 (0)