From 015f222d4e6479d2d3209973de597c60199067ba Mon Sep 17 00:00:00 2001 From: Mirlan Date: Fri, 24 Jul 2020 16:54:58 +0600 Subject: [PATCH] fix(#246): login email on blur validation (#57) --- src/features/Login/hooks.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/Login/hooks.tsx b/src/features/Login/hooks.tsx index 1e91dc8a..8b796cbf 100644 --- a/src/features/Login/hooks.tsx +++ b/src/features/Login/hooks.tsx @@ -18,7 +18,8 @@ export const useLoginForm = () => { const { login } = useAuthStore() const onEmailBlur = ({ target }: FocusEvent) => { - if (!isValidEmail(target.value)) { + const email = target.value + if (email && !isValidEmail(email)) { updateFormError(formIds.email, 'error_invalid_email_format') } }