Add missing undefined check

This commit is contained in:
Fabio Berger
2018-07-04 16:34:03 +02:00
parent 8ff17ff960
commit 4e783fba57

View File

@@ -102,6 +102,7 @@ export class Blockchain {
// Our core assumptions about the injected web3 object is that it has the following
// properties and methods.
if (
_.isUndefined(injectedWeb3IfExists) ||
_.isUndefined(injectedWeb3IfExists.version) ||
_.isUndefined(injectedWeb3IfExists.version.getNetwork) ||
_.isUndefined(injectedWeb3IfExists.currentProvider)