aboutsummaryrefslogtreecommitdiffstats
path: root/packages
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
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')
-rw-r--r--packages/website/ts/blockchain.ts2
-rw-r--r--packages/website/webpack.config.js1
2 files changed, 1 insertions, 2 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;
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js
index ec265be93..33d5f648b 100644
--- a/packages/website/webpack.config.js
+++ b/packages/website/webpack.config.js
@@ -100,7 +100,6 @@ module.exports = (_env, argv) => {
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.DefinePlugin({
'process.env': {
- NODE_ENV: JSON.stringify(process.env.NODE_ENV),
GIT_SHA: JSON.stringify(GIT_SHA),
},
}),