From c0bcc15023bb6f4b18648cebb8e9373f6dd5a6a3 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 1 Mar 2017 21:08:28 -0500 Subject: [PATCH] simplify condition; return callback --- lib/contracts/compiler.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/contracts/compiler.js b/lib/contracts/compiler.js index acde2a17..f7a7c70e 100644 --- a/lib/contracts/compiler.js +++ b/lib/contracts/compiler.js @@ -74,13 +74,13 @@ Compiler.prototype.compile_solidity = function(contractFiles, cb) { // TODO: there ino need to load this twice solcW = new SolcW(); if (solcW.isCompilerLoaded()) { - callback(); - } else { - self.logger.info("loading solc compiler.."); - solcW.load_compiler(function(){ - callback(); - }); + return callback(); } + + self.logger.info("loading solc compiler.."); + solcW.load_compiler(function(){ + callback(); + }); }, function compileContracts(callback) { self.logger.info("compiling contracts...");