fix(compiler-cli): remove leftover _extendedTemplateDiagnostics requirements (#44777)

Refs #42966.

There were two remaining places where `_extendedTemplateDiagnostics` needed to be set which should have been removed in #44712 but got missed. This updates them to only require `strictTemplates` and not `_extendedTemplateDiagnostics` so the feature is properly enabled in production.

PR Close #44777
This commit is contained in:
Doug Parker
2022-01-20 10:32:24 -08:00
committed by Andrew Kushnir
parent 4e180cb43b
commit 197f3f4a26
2 changed files with 10 additions and 6 deletions
@@ -446,7 +446,7 @@ export class NgCompiler {
diagnostics.push(
...this.getNonTemplateDiagnostics().filter(diag => diag.file === file),
...this.getTemplateDiagnosticsForFile(file, optimizeFor));
if (this.options._extendedTemplateDiagnostics) {
if (this.options.strictTemplates) {
diagnostics.push(...this.getExtendedTemplateDiagnostics(file));
}
return this.addMessageTextDetails(diagnostics);
@@ -460,7 +460,7 @@ export class NgCompiler {
const ttc = compilation.templateTypeChecker;
const diagnostics: ts.Diagnostic[] = [];
diagnostics.push(...ttc.getDiagnosticsForComponent(component));
if (this.options._extendedTemplateDiagnostics) {
if (this.options.strictTemplates) {
const extendedTemplateChecker = compilation.extendedTemplateChecker;
diagnostics.push(...extendedTemplateChecker.getDiagnosticsForComponent(component));
}