From ed154fdfdb2c6eb73fa9647775ea7996a74d1e5a Mon Sep 17 00:00:00 2001 From: Fabian Vogelsteller Date: Tue, 7 Jul 2015 11:14:28 +0200 Subject: [PATCH] minor fix for error reporting --- lib/web3/contract.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/web3/contract.js b/lib/web3/contract.js index 4367eae..082d615 100644 --- a/lib/web3/contract.js +++ b/lib/web3/contract.js @@ -129,11 +129,10 @@ var checkForContractAddress = function(contract, callback){ contract.address = receipt.contractAddress; - if(callback) { + if(callback) callback(null, contract); - } - } else { + } else if(callback) { callback(new Error('The contract code couldn\'t be stored')); }