Skip to content

Commit 227008a

Browse files
committed
fixed bug in tools playground to support comma and space separated states while selecting background color
1 parent 3b5aa62 commit 227008a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/features/components/tools/Playground.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,29 @@ export const ToolsPlayground = (props: ToolsPlaygroundProps) => {
9696
state.id
9797
.replaceAll(uniqueWord, "")
9898
.split(", ")
99+
.join(" ")
100+
.split(" ")
99101
.includes(initialState) &&
100102
state.id
101103
.replaceAll(uniqueWord, "")
102104
.split(", ")
105+
.join(" ")
106+
.split(" ")
103107
.some((s) => finalStates.includes(s))
104108
? stateInitialFinalColor
105109
: index === 0 &&
106110
state.id
107111
.replaceAll(uniqueWord, "")
108112
.split(", ")
113+
.join(" ")
114+
.split(" ")
109115
.includes(initialState)
110116
? stateInitialColor
111117
: state.id
112118
.replaceAll(uniqueWord, "")
113119
.split(", ")
120+
.join(" ")
121+
.split(" ")
114122
.some((s) => finalStates.includes(s))
115123
? stateFinalColor
116124
: undefined,

0 commit comments

Comments
 (0)