From e0c1626f09d92f2f7d2ee343c2d9e9c7f0301199 Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Fri, 27 Dec 2024 15:13:15 +0100 Subject: [PATCH] username null check --- apps/login/src/components/username-form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/login/src/components/username-form.tsx b/apps/login/src/components/username-form.tsx index 7d18623a..887c4543 100644 --- a/apps/login/src/components/username-form.tsx +++ b/apps/login/src/components/username-form.tsx @@ -61,11 +61,11 @@ export function UsernameForm({ setLoading(false); }); - if (res?.redirect) { + if (res && "redirect" in res && res.redirect) { return router.push(res.redirect); } - if (res?.error) { + if (res && "error" in res && res.error) { setError(res.error); return; }