aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-11-16 02:46:53 +0800
committerGitHub <noreply@github.com>2018-11-16 02:46:53 +0800
commit1dd903ddcc99279d2cfe92e01ef77c901b07246f (patch)
treefa6398267c8765f511622811e230f3cc23828469 /packages/website/ts/blockchain.ts
parent8afcba7ba16382fd656518e8de3b55267e0f7722 (diff)
parent408bbdb52e90a213df6a21ccfc66c2972ca6c790 (diff)
downloaddexon-sol-tools-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar
dexon-sol-tools-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar.gz
dexon-sol-tools-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar.bz2
dexon-sol-tools-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar.lz
dexon-sol-tools-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar.xz
dexon-sol-tools-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar.zst
dexon-sol-tools-1dd903ddcc99279d2cfe92e01ef77c901b07246f.zip
Merge pull request #1263 from 0xProject/fix/website/node-env
[website] Fix currentProvider called on undefined and NODE_ENV production warning
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-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;