mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Andrew Kushnir
parent
4e180cb43b
commit
197f3f4a26
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user