Skip to content

Commit

Permalink
fix(@ngtools/webpack): ensure webpack errors are actually an Error
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin committed Mar 6, 2018
1 parent 9ac1b36 commit 9c4f9e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ export class AngularCompilerPlugin {
timeEnd('AngularCompilerPlugin._make');
cb();
}, (err: any) => {
compilation.errors.push(err.stack);
compilation.errors.push(err);
this.pushCompilationErrors(compilation);
timeEnd('AngularCompilerPlugin._make');
cb();
Expand Down Expand Up @@ -807,7 +807,7 @@ export class AngularCompilerPlugin {

if (errors.length > 0) {
const message = formatDiagnostics(errors);
this._errors.push(message);
this._errors.push(new Error(message));
}

if (warnings.length > 0) {
Expand Down

0 comments on commit 9c4f9e9

Please sign in to comment.