aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-04 22:34:03 +0800
committerFabio Berger <me@fabioberger.com>2018-07-04 22:34:03 +0800
commit4e783fba57bbd3d389ab52679ca8763bfa03cbf3 (patch)
tree048e018e838020d93508d74db5b518c9889c6423
parent8ff17ff9603f6b574e76f5ef160fe59c3afb2a86 (diff)
downloaddexon-0x-contracts-4e783fba57bbd3d389ab52679ca8763bfa03cbf3.tar.gz
dexon-0x-contracts-4e783fba57bbd3d389ab52679ca8763bfa03cbf3.tar.zst
dexon-0x-contracts-4e783fba57bbd3d389ab52679ca8763bfa03cbf3.zip
Add missing undefined check
-rw-r--r--packages/website/ts/blockchain.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 6a92403f2..cc2afa28a 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -102,6 +102,7 @@ export class Blockchain {
// Our core assumptions about the injected web3 object is that it has the following
// properties and methods.
if (
+ _.isUndefined(injectedWeb3IfExists) ||
_.isUndefined(injectedWeb3IfExists.version) ||
_.isUndefined(injectedWeb3IfExists.version.getNetwork) ||
_.isUndefined(injectedWeb3IfExists.currentProvider)