From eb794d6a755b251d9071fc85d971c3b591d0a822 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Fri, 20 Oct 2023 13:28:48 -0700 Subject: [PATCH] Fixed type. --- packages/stateless/components/inputs/InputErrorMessage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/stateless/components/inputs/InputErrorMessage.tsx b/packages/stateless/components/inputs/InputErrorMessage.tsx index 822f18f1e..40850ac4f 100644 --- a/packages/stateless/components/inputs/InputErrorMessage.tsx +++ b/packages/stateless/components/inputs/InputErrorMessage.tsx @@ -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 ? (