username null check

This commit is contained in:
Max Peintner
2024-12-27 15:13:15 +01:00
parent 4ff9b44f88
commit e0c1626f09

View File

@@ -61,11 +61,11 @@ export function UsernameForm({
setLoading(false); setLoading(false);
}); });
if (res?.redirect) { if (res && "redirect" in res && res.redirect) {
return router.push(res.redirect); return router.push(res.redirect);
} }
if (res?.error) { if (res && "error" in res && res.error) {
setError(res.error); setError(res.error);
return; return;
} }