Skip to content

Commit de798be

Browse files
committed
fix(@ngtools/webpack): fix for #7615
Check if this.done is defined before delaying file access
1 parent 1652aa3 commit de798be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@ngtools/webpack/src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ export class AotPlugin implements Tapable {
390390
// Wait for the plugin to be done when requesting `.ts` files directly (entry points), or
391391
// when the issuer is a `.ts` file.
392392
compiler.resolvers.normal.plugin('before-resolve', (request: any, cb: () => void) => {
393-
if (request.request.endsWith('.ts')
393+
if (this.done && request.request.endsWith('.ts')
394394
|| (request.context.issuer && request.context.issuer.endsWith('.ts'))) {
395-
this.done!.then(() => cb(), () => cb());
395+
this.done.then(() => cb(), () => cb());
396396
} else {
397397
cb();
398398
}

0 commit comments

Comments
 (0)