diff --git a/packages/web3-eth-contract/src/index.js b/packages/web3-eth-contract/src/index.js index 64aba3367cd..e63997982ee 100644 --- a/packages/web3-eth-contract/src/index.js +++ b/packages/web3-eth-contract/src/index.js @@ -66,8 +66,8 @@ var Contract = function Contract(jsonInterface, address, options) { throw new Error('Please use the "new" keyword to instantiate a web3.eth.contract() object!'); } - if(!jsonInterface || !(jsonInterface instanceof Array)) { - throw new Error('You must provide the json interface of the contract when instatiating a contract object.'); + if(!jsonInterface || !(Array.isArray(jsonInterface))) { + throw new Error('You must provide the json interface of the contract when instantiating a contract object.'); } // add custom send Methods