Skip to content

Commit

Permalink
fix: πŸ› traits missing field causes nft details to break (#533)
Browse files Browse the repository at this point in the history
fix: πŸ› traits might not be available
  • Loading branch information
heldrida authored Sep 13, 2022
1 parent cc50d0b commit 24fad05
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/nft-details/nft-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,13 @@ export const NftDetails = () => {
name={nftDetails?.traits[`${key}`].name}
rimValue={`${
nftDetails?.traits[`${key}`].occurance
} (${roundOffDecimalValue(
nftDetails?.traits[`${key}`].rarity,
2,
)}%)`}
} (${
nftDetails?.traits[`${key}`].rarity &&
roundOffDecimalValue(
nftDetails?.traits[`${key}`].rarity,
2,
)
}%)`}
/>
))}
</>
Expand Down

0 comments on commit 24fad05

Please sign in to comment.