From dba446b3282a8c4ab3f11ae26a0870accdd82141 Mon Sep 17 00:00:00 2001 From: achraf elghinoussi Date: Thu, 30 Dec 2021 07:51:31 +0100 Subject: [PATCH] fix(hooks): explore page breaking because of undefined contractAddress --- packages/hooks/src/NFT/useNFTContract.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hooks/src/NFT/useNFTContract.ts b/packages/hooks/src/NFT/useNFTContract.ts index 05aa6933..000334a8 100644 --- a/packages/hooks/src/NFT/useNFTContract.ts +++ b/packages/hooks/src/NFT/useNFTContract.ts @@ -15,7 +15,7 @@ export function useNFTContract(contractAddress: string) { const { getContract, accountId } = useNearHooksContainer() const setupContract = () => { - if (contractAddress.includes('undefined')) { + if (!contractAddress || contractAddress.includes('undefined')) { return }