Skip to content

Commit

Permalink
fix: Check for null profile names (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolmin authored Nov 14, 2024
1 parent c1452f5 commit c9bc4b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/api/graphTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export type ProfileImage = {
export type SearchProfileQueryResponse = {
profileImages: Array<ProfileImage>;
id: string;
name: string;
fullName: string;
name: string | null;
fullName: string | null;
};

export type GraphQuery = {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/useUniversalProfileApiFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit c9bc4b1

Please sign in to comment.