Skip to content

Commit

Permalink
Fixed type.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Oct 20, 2023
1 parent 6088c44 commit eb794d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/stateless/components/inputs/InputErrorMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export const InputErrorMessage = ({
(typeof error === 'string'
? error
: error instanceof Error ||
(typeof error === 'object' && 'message' in error)
? error.message
(typeof error === 'object' &&
'message' in error &&
typeof (error as { message: string }).message === 'string')
? (error as { message: string }).message
: `${error}`)

return message ? (
Expand Down

0 comments on commit eb794d6

Please sign in to comment.