From 8e2af920b88de97341e0fb29a586f76f054e19d0 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 17 May 2018 10:02:53 -0400 Subject: [PATCH] early callback in compiler --- lib/contracts/compiler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/contracts/compiler.js b/lib/contracts/compiler.js index af2cc5eb..e6c4fc23 100644 --- a/lib/contracts/compiler.js +++ b/lib/contracts/compiler.js @@ -32,7 +32,10 @@ class Compiler { return false; }); - compiler.call(compiler, matchingFiles || [], function (err, compileResult) { + if (!matchingFiles || !matchingFiles.length) { + return callback(); + } + compiler.call(compiler, matchingFiles, function (err, compileResult) { Object.assign(compiledObject, compileResult); callback(err, compileResult); });