Fix login by email blocked

This commit is contained in:
Charles Bochet
2024-04-26 18:22:36 +02:00
parent 76d4188ba8
commit 27cd577dbb

View File

@ -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