Update apps/login/ui/SetPasswordForm.tsx

Co-authored-by: Elio Bischof <elio@zitadel.com>
This commit is contained in:
Max Peintner
2023-06-21 07:05:04 +02:00
committed by GitHub
parent 6431ea0e1b
commit 9edfdc805e

View File

@@ -57,13 +57,10 @@ export default function SetPasswordForm({
password: values.password,
}),
});
if (!res.ok) {
setLoading(false);
if (!res.ok) {
throw new Error("Failed to register user");
}
setLoading(false);
return res.json();
}