Skip to content

Commit

Permalink
fix(@ngtools/webpack): fix for angular#7615
Browse files Browse the repository at this point in the history
Check if this.done is defined before delaying file access
  • Loading branch information
rezonant committed Sep 7, 2017
1 parent 1652aa3 commit 632f553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@ngtools/webpack/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export class AotPlugin implements Tapable {
// Wait for the plugin to be done when requesting `.ts` files directly (entry points), or
// when the issuer is a `.ts` file.
compiler.resolvers.normal.plugin('before-resolve', (request: any, cb: () => void) => {
if (request.request.endsWith('.ts')
if (this.done && request.request.endsWith('.ts')
|| (request.context.issuer && request.context.issuer.endsWith('.ts'))) {
this.done!.then(() => cb(), () => cb());
} else {
Expand Down

0 comments on commit 632f553

Please sign in to comment.