early callback in compiler

This commit is contained in:
Jonathan Rainville 2018-05-17 10:02:53 -04:00
parent bcb7c80758
commit 8e2af920b8
1 changed files with 4 additions and 1 deletions

View File

@ -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);
});