Skip to content

Commit

Permalink
refactor: remove a redundant type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mashabow committed Mar 12, 2024
1 parent 7449925 commit a8fbe66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rhf-mui/src/RadioButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const RadioButtonGroup = forwardRef(function RadioButtonGroup<
: helperText

const onRadioChange = (event: ChangeEvent<HTMLInputElement>) => {
const target = event.target as HTMLInputElement
const radioValue = type === 'number' ? Number(target.value) : target.value
const radioValue =
type === 'number' ? Number(event.target.value) : event.target.value
const returnValue = returnObject
? options.find((items) => items[valueKey] === radioValue)
: radioValue
Expand Down

0 comments on commit a8fbe66

Please sign in to comment.