Skip to content

Commit

Permalink
fix: denom can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorency committed Sep 3, 2024
1 parent 1b32348 commit 5187c96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/factory/components/DenomImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const DenomImage = ({ denom }: { denom: any }) => {
}

// Check for MFX token first
if (denom.base.includes('umfx')) {
if (denom?.base?.includes('umfx')) {
return (
<Image
width={0}
Expand All @@ -101,8 +101,8 @@ export const DenomImage = ({ denom }: { denom: any }) => {
}

// Then check for other conditions
if (!denom.uri || !isSupported || imageError) {
return <ProfileAvatar walletAddress={denom.base} />;
if (!denom?.uri || !isSupported || imageError) {
return <ProfileAvatar walletAddress={denom?.base} />;
}

// For all other cases, use the denom.uri
Expand Down

0 comments on commit 5187c96

Please sign in to comment.