From f7dc4a079311449a5f5cbf7a544b13982472339f Mon Sep 17 00:00:00 2001 From: wunci Date: Mon, 24 Jun 2024 00:59:26 +0800 Subject: [PATCH] fix: attr inherit case in expression --- src/compilers/anode-compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compilers/anode-compiler.ts b/src/compilers/anode-compiler.ts index b63fcc94..1fd5157f 100644 --- a/src/compilers/anode-compiler.ts +++ b/src/compilers/anode-compiler.ts @@ -340,7 +340,7 @@ export class ANodeCompiler { for (const attr of aNode.attrs) { const result = TypeGuards.isExprBoolNode(attr.expr) || attr.expr.value === '' ? L(attr.name) - : BINARY(L(`${attr.name}="`), '+', BINARY(sanExpr(attr.expr), '+', L('"'))) + : BINARY(BINARY(L(`${attr.name}="`), '+', sanExpr(attr.expr)), '+', L('"')) attrList.push([result, false]) attrListMap.push([L(attr.name), L(1)]) }