aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-11-15 07:10:47 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-11-15 07:25:40 +0800
commitf2a6feff29ea990eb3fbf22726a4ff772fd8bfbc (patch)
treec3869d6cc4cf4a35ccc129a322338d9c21dc0231 /packages/website
parent7ccf9cd48efc3be7ca0ed3637e2b7b7dd02dc908 (diff)
downloaddexon-sol-tools-f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc.tar
dexon-sol-tools-f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc.tar.gz
dexon-sol-tools-f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc.tar.bz2
dexon-sol-tools-f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc.tar.lz
dexon-sol-tools-f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc.tar.xz
dexon-sol-tools-f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc.tar.zst
dexon-sol-tools-f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc.zip
fix(website): currentProvider called on undefined
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/blockchain.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 25430c1c7..37f746f7c 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -591,7 +591,7 @@ export class Blockchain {
}
} else {
const injectedWeb3IfExists = (window as any).web3;
- if (!_.isUndefined(injectedWeb3IfExists.currentProvider)) {
+ if (!_.isUndefined(injectedWeb3IfExists) && !_.isUndefined(injectedWeb3IfExists.currentProvider)) {
injectedProviderIfExists = injectedWeb3IfExists.currentProvider;
} else {
return undefined;