From 40ca58b2eda155b0609b298a5abdb5cfe1705640 Mon Sep 17 00:00:00 2001 From: victa Date: Tue, 7 Jun 2022 03:16:49 +1000 Subject: [PATCH] update: contractShardId can be 0, change to null-check --- src/pages/AddressPage/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/AddressPage/index.tsx b/src/pages/AddressPage/index.tsx index 7487a71..4860723 100644 --- a/src/pages/AddressPage/index.tsx +++ b/src/pages/AddressPage/index.tsx @@ -147,7 +147,7 @@ export function AddressPage() { // contract defined and contract address same as id // note: when we toggle there is scenarios where the id are not the same // @ts-ignore - if (!!contracts && contracts?.address === id && !!contractShardId) { + if (!!contracts && contracts?.address === id && contractShardId !== null) { loadSourceCode(id, contractShardId) .then((res) => setSourceCode(res)) .catch((except) => {