diff --git a/lib/compiler.js b/lib/compiler.js index 54453fc96..49c5dcfd0 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -22,8 +22,8 @@ Compiler.prototype.compile_solidity = function(contractFiles) { var output = solc.compile({sources: input}, 1); - if (output.errors.length > 0) - throw new Error ("Solidity errors: " + output.errors)) + if (output.errors) + throw new Error ("Solidity errors: " + output.errors) var json = output.contracts;