fix(ivy): compile pipe in context of ternary operator (#28635)
Previously, it wasn't possible to compile template that contains pipe in context of ternary operator `{{ 1 ? 2 : 0 | myPipe }}` due to the error `Error: Illegal state: Pipes should have been converted into functions. Pipe: async`. This PR fixes a typo in expression parser so that pipes are correctly converted into functions. PR Close #28635
This commit is contained in:

committed by
Miško Hevery

parent
2ca77da4ca
commit
2bf0d1a56f
@ -546,7 +546,7 @@ export class AstMemoryEfficientTransformer implements AstVisitor {
|
||||
const condition = ast.condition.visit(this);
|
||||
const trueExp = ast.trueExp.visit(this);
|
||||
const falseExp = ast.falseExp.visit(this);
|
||||
if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== falseExp) {
|
||||
if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {
|
||||
return new Conditional(ast.span, condition, trueExp, falseExp);
|
||||
}
|
||||
return ast;
|
||||
|
Reference in New Issue
Block a user