From 1f954185045fe42a887813e04a7096286e4ee0dc Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 28 Dec 2017 07:30:41 -0500 Subject: [PATCH] use for to avoid multiple callback calls --- lib/contracts/deploy_manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js index b5967338..b78c4d64 100644 --- a/lib/contracts/deploy_manager.js +++ b/lib/contracts/deploy_manager.js @@ -118,7 +118,7 @@ class DeployManager { } // TODO: convert to for to avoid repeated callback - onDeployCode.forEach((cmd) => { + for(let cmd of onDeployCode) { self.logger.info("executing: " + cmd); try { RunCode.doEval(cmd, web3); @@ -128,7 +128,7 @@ class DeployManager { } return callback(new Error(e)); } - }); + } callback(null, contractsManager); }