diff options
-rw-r--r-- | app/scripts/controllers/network.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/scripts/controllers/network.js b/app/scripts/controllers/network.js index 0f9db4d53..7f0cbd379 100644 --- a/app/scripts/controllers/network.js +++ b/app/scripts/controllers/network.js @@ -51,6 +51,10 @@ module.exports = class NetworkController extends EventEmitter { } lookupNetwork () { + // Prevent firing when provider is not defined. + if (!this.ethQuery || !this.ethQuery.sendAsync) { + return + } this.ethQuery.sendAsync({ method: 'net_version' }, (err, network) => { if (err) return this.setNetworkState('loading') log.info('web3.getNetwork returned ' + network) |