Skip to content

Commit e335e5d

Browse files
sumbadfilipesilva
authored andcommitted
fix(@ngtools/webpack): add check for request parameter
1 parent 8b5b9a1 commit e335e5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,9 @@ export class AngularCompilerPlugin {
679679
// Wait for the plugin to be done when requesting `.ts` files directly (entry points), or
680680
// when the issuer is a `.ts` or `.ngfactory.js` file.
681681
nmf.hooks.beforeResolve.tapAsync('angular-compiler', (request: any, callback: any) => {
682-
if (this.done && (request.request.endsWith('.ts')
683-
|| (request.context.issuer && /\.ts|ngfactory\.js$/.test(request.context.issuer)))) {
682+
if (this.done && (request && request.request.endsWith('.ts')
683+
|| (request && request.context.issuer
684+
&& /\.ts|ngfactory\.js$/.test(request.context.issuer)))) {
684685
this.done.then(() => callback(null, request), () => callback(null, request));
685686
} else {
686687
callback(null, request);

0 commit comments

Comments
 (0)