diff --git a/lib/api/graphTypes.ts b/lib/api/graphTypes.ts index 06c3052563..54e26b63f2 100644 --- a/lib/api/graphTypes.ts +++ b/lib/api/graphTypes.ts @@ -6,8 +6,8 @@ export type ProfileImage = { export type SearchProfileQueryResponse = { profileImages: Array; id: string; - name: string; - fullName: string; + name: string | null; + fullName: string | null; }; export type GraphQuery = { diff --git a/lib/api/useUniversalProfileApiFetch.ts b/lib/api/useUniversalProfileApiFetch.ts index eb4e844158..73764b97e5 100644 --- a/lib/api/useUniversalProfileApiFetch.ts +++ b/lib/api/useUniversalProfileApiFetch.ts @@ -34,7 +34,7 @@ export default function useUniversalProfileApiFetch() { const hitAsUp = hit as unknown as SearchProfileQueryResponse; return { type: 'universal_profile', - name: hitAsUp.name !== '' ? hitAsUp.name.trim() : null, + name: hitAsUp.name != null && hitAsUp.name !== '' ? hitAsUp.name.trim() : null, address: getCheckedSummedAddress(hit.id), is_smart_contract_verified: false, };