Skip to content

Commit

Permalink
fix(@ngtools/webpack): don't set ngprogram to null
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva authored and vikerman committed Oct 17, 2019
1 parent f7e9dff commit e483a50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class AngularCompilerPlugin {
// TS compilation.
private _compilerOptions: CompilerOptions;
private _rootNames: string[];
private _program: (ts.Program | Program) | null;
private _program: (ts.Program | Program) | undefined;
private _compilerHost: WebpackCompilerHost & CompilerHost;
private _moduleResolutionCache: ts.ModuleResolutionCache;
private _resourceLoader?: WebpackResourceLoader;
Expand Down Expand Up @@ -673,7 +673,7 @@ export class AngularCompilerPlugin {
// only present for webpack 4.23.0+, assume true otherwise
const watchMode = rootCompiler.watchMode === undefined ? true : rootCompiler.watchMode;
if (!watchMode) {
this._program = null;
this._program = undefined;
this._transformers = [];
this._resourceLoader = undefined;
this._compilerHost.reset();
Expand Down Expand Up @@ -1385,7 +1385,7 @@ export class AngularCompilerPlugin {
} else {
errMsg = e.stack;
// It is not a syntax error we might have a program with unknown state, discard it.
this._program = null;
this._program = undefined;
code = UNKNOWN_ERROR_CODE;
}
allDiagnostics.push(
Expand Down

0 comments on commit e483a50

Please sign in to comment.