diff options
author | Brandon Millman <brandon@0xproject.com> | 2018-11-16 02:46:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-16 02:46:53 +0800 |
commit | 1dd903ddcc99279d2cfe92e01ef77c901b07246f (patch) | |
tree | fa6398267c8765f511622811e230f3cc23828469 /packages | |
parent | 8afcba7ba16382fd656518e8de3b55267e0f7722 (diff) | |
parent | 408bbdb52e90a213df6a21ccfc66c2972ca6c790 (diff) | |
download | dexon-0x-contracts-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar.gz dexon-0x-contracts-1dd903ddcc99279d2cfe92e01ef77c901b07246f.tar.zst dexon-0x-contracts-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.ts | 2 | ||||
-rw-r--r-- | packages/website/webpack.config.js | 1 |
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), }, }), |