feat(compiler): support safe keyed read expressions (#41911)
Currently we support safe property (`a?.b`) and method (`a?.b()`) accesses, but we don't handle safe keyed reads (`a?.[0]`) which is inconsistent. These changes expand the compiler in order to support safe key read expressions as well. PR Close #41911
This commit is contained in:
committed by
Jessica Janiuk
parent
47270d9e63
commit
ba084857ea
@@ -114,6 +114,10 @@ class ExpressionSourceHumanizer extends e.RecursiveAstVisitor implements t.Templ
|
||||
this.recordAst(ast);
|
||||
super.visitQuote(ast, null);
|
||||
}
|
||||
visitSafeKeyedRead(ast: e.SafeKeyedRead) {
|
||||
this.recordAst(ast);
|
||||
super.visitSafeKeyedRead(ast, null);
|
||||
}
|
||||
|
||||
visitNgContent(ast: t.NgContentAst) {}
|
||||
visitEmbeddedTemplate(ast: t.EmbeddedTemplateAst) {
|
||||
|
||||
Reference in New Issue
Block a user