diff --git a/src/components/auth/auth-form.tsx b/src/components/auth/auth-form.tsx index dfe9a69..0ab5b28 100644 --- a/src/components/auth/auth-form.tsx +++ b/src/components/auth/auth-form.tsx @@ -128,9 +128,8 @@ const AuthForm = (): ReactElement => { method: "POST", body: { email }, }); - if (error) { - setError(error.message); - } else { + setError(error?.message); + if (!error) { setStage(data?.exists ? "login" : "register"); } } else {