From 96d8cda5c3c1809d7319f395130ce8d62ee276b8 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 4 May 2024 21:13:19 +0800 Subject: [PATCH] fix: fix a problem which user info maybe return null cause error --- client/shared/hooks/model/useUserInfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/shared/hooks/model/useUserInfo.ts b/client/shared/hooks/model/useUserInfo.ts index aa2a4ce3c3f..9ad0692a6d5 100644 --- a/client/shared/hooks/model/useUserInfo.ts +++ b/client/shared/hooks/model/useUserInfo.ts @@ -15,5 +15,5 @@ export function useCachedUserInfo( return users; }, [userId, refetch]); - return userInfo; + return userInfo ?? {}; }