Merge pull request #243 from denis-sokolov/patch-1
Properly throw an error in compiler even when childCompilation is missing
This commit is contained in:
commit
4d3c7319ed
|
|
@ -71,7 +71,7 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
|
|||
delete compilation.assets[outputOptions.filename];
|
||||
}
|
||||
// Resolve / reject the promise
|
||||
if (childCompilation.errors && childCompilation.errors.length) {
|
||||
if (childCompilation && childCompilation.errors && childCompilation.errors.length) {
|
||||
var errorDetails = childCompilation.errors.map(function (error) {
|
||||
return error.message + (error.error ? ':\n' + error.error : '');
|
||||
}).join('\n');
|
||||
|
|
|
|||
Loading…
Reference in New Issue