diff --git a/packages/extension-onboarding/src/components/NFTItem/NFTItem.tsx b/packages/extension-onboarding/src/components/NFTItem/NFTItem.tsx index 85ebb810b7..de801f8ca2 100644 --- a/packages/extension-onboarding/src/components/NFTItem/NFTItem.tsx +++ b/packages/extension-onboarding/src/components/NFTItem/NFTItem.tsx @@ -14,9 +14,9 @@ const NFTItem: FC = ({ item }: INFTItemProps) => { const regexpImage = /(\"image.*?\":\s*?\"(\s*?.*?\s*?)\")/; const regexpUrl = /(https?|ipfs):\/\/([-A-Z0-9.]+)(\/[-A-Z0-9+&@#\/%=~_|!:,.;]*)/i; - const splittedData = item.metadata.split(regexpImage); + const splittedData = item.metadata?.split(regexpImage); const extractedImages: string[] = []; - splittedData.forEach((key) => { + splittedData?.forEach((key) => { if (regexpImage.test(key)) { const imageUrl = key.match(regexpImage)?.[2]; if (imageUrl && regexpUrl.test(imageUrl)) {