fix(ivy): ensure [style] and [class] bindings are placed in the same instruction (#26126)
PR Close #26126
This commit is contained in:

committed by
Alex Rickabaugh

parent
9523991a9b
commit
7cf5807100
@ -549,21 +549,22 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
|
||||
|
||||
const stylingInput = mapBasedStyleInput || mapBasedClassInput;
|
||||
if (stylingInput) {
|
||||
const params: o.Expression[] = [];
|
||||
let value: AST;
|
||||
if (mapBasedClassInput) {
|
||||
value = mapBasedClassInput.value.visit(this._valueConverter);
|
||||
} else if (mapBasedStyleInput) {
|
||||
params.push(o.NULL_EXPR);
|
||||
}
|
||||
|
||||
if (mapBasedStyleInput) {
|
||||
value = mapBasedStyleInput.value.visit(this._valueConverter);
|
||||
}
|
||||
|
||||
this.updateInstruction(stylingInput.sourceSpan, R3.elementStylingMap, () => {
|
||||
params.push(this.convertPropertyBinding(implicit, value, true));
|
||||
return [indexLiteral, ...params];
|
||||
const params: o.Expression[] = [indexLiteral];
|
||||
|
||||
if (mapBasedClassInput) {
|
||||
const mapBasedClassValue = mapBasedClassInput.value.visit(this._valueConverter);
|
||||
params.push(this.convertPropertyBinding(implicit, mapBasedClassValue, true));
|
||||
} else if (mapBasedStyleInput) {
|
||||
params.push(o.NULL_EXPR);
|
||||
}
|
||||
|
||||
if (mapBasedStyleInput) {
|
||||
const mapBasedStyleValue = mapBasedStyleInput.value.visit(this._valueConverter);
|
||||
params.push(this.convertPropertyBinding(implicit, mapBasedStyleValue, true));
|
||||
}
|
||||
|
||||
return params;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user