fix query response cant be undefined

This commit is contained in:
Danel Kungla
2025-09-04 10:59:34 +03:00
parent 5176ecdddc
commit 152ec5f36b
2 changed files with 2 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ export function useUser(initialData?: User | null) {
// this is most likely a session error or the user is not logged in
if (response.error) {
return undefined;
return null;
}
if (response.data?.user) {