Skip to content

Commit

Permalink
Do not crash when nft is missing ownership data
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Dec 1, 2023
1 parent 400dfe4 commit d52ff2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/pages/AccountDetailsPage/AccountNFTCollectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ export const AccountNFTCollectionCard: FC<AccountDetailsContext> = ({ scope, add
{isFetched && (
<Box sx={{ display: 'flex', alignItems: 'baseline' }} gap={2}>
<Typography color={COLORS.brandExtraDark} fontSize={24}>
{inventory?.[0].token.name ? inventory?.[0].token.name : t('common.collection')}
{inventory?.length && inventory?.[0].token.name
? inventory?.[0].token.name
: t('common.collection')}
</Typography>
{totalCount && (
{!!totalCount && (
<Typography>({`${isTotalCountClipped ? ' > ' : ''}${totalCount}`})</Typography>
)}
</Box>
Expand Down

0 comments on commit d52ff2d

Please sign in to comment.