From 27cd577dbb282be27d04d802ac407858d4439f65 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 26 Apr 2024 18:22:36 +0200 Subject: [PATCH] Fix login by email blocked --- .../src/modules/auth/sign-in-up/components/SignInUpForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx index c4b690e41..a5823db43 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx +++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx @@ -127,7 +127,7 @@ export const SignInUpForm = () => { const isEmailStepSubmitButtonDisabledCondition = signInUpStep === SignInUpStep.Email && - (form.watch('email').length === 0 || shouldWaitForCaptchaToken); + (form.watch('email')?.length === 0 || shouldWaitForCaptchaToken); // TODO: isValid is actually a proxy function. If it is not rendered the first time, react might not trigger re-renders // We make the isValid check synchronous and update a reactState to make sure this does not happen