aboutsummaryrefslogtreecommitdiffstats
path: root/packages
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 /packages
parent8ff17ff9603f6b574e76f5ef160fe59c3afb2a86 (diff)
downloaddexon-sol-tools-4e783fba57bbd3d389ab52679ca8763bfa03cbf3.tar.gz
dexon-sol-tools-4e783fba57bbd3d389ab52679ca8763bfa03cbf3.tar.zst
dexon-sol-tools-4e783fba57bbd3d389ab52679ca8763bfa03cbf3.zip
Add missing undefined check
Diffstat (limited to 'packages')
-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)