Skip to content

Commit 2a30a22

Browse files
Just-InsaneCopilot
andauthored
Update src/app/hooks/useUserProfile.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e7fd523 commit 2a30a22

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/hooks/useUserProfile.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ export const useUserProfile = (
105105
const setGlobalProfiles = useSetAtom(profilesCacheAtom);
106106

107107
const hasOnlyFetchedMarker =
108-
cached?._fetched === true && Object.keys(cached).every((key) => key === '_fetched');
108+
cached?._fetched === true &&
109+
Object.keys(cached ?? {}).every((key) => key === '_fetched');
109110

110111
const needsFetch =
111112
!!userId && userId !== 'undefined' && (!cached?._fetched || hasOnlyFetchedMarker);

0 commit comments

Comments
 (0)