Skip to content

Commit

Permalink
Fixing check
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Dec 20, 2021
1 parent 408993e commit a4920bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/lib/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ export const normalizeValue = (
break

case DataType.BUTTON:
if (value.toLowerCase() in ButtonPayload) {
if (Object.values(ButtonPayload).includes(value.toLowerCase())) {
return value.toLowerCase()
}

return null

case DataType.SWITCH:
if (value.toLowerCase() in SwitchPayload) {
if (Object.values(SwitchPayload).includes(value.toLowerCase())) {
return value.toLowerCase()
}

Expand Down

0 comments on commit a4920bc

Please sign in to comment.