Skip to content

Commit 096742c

Browse files
authored
fix: attr inherit case in expression (#176)
1 parent 795b3e3 commit 096742c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compilers/anode-compiler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ export class ANodeCompiler {
340340
for (const attr of aNode.attrs) {
341341
const result = TypeGuards.isExprBoolNode(attr.expr) || attr.expr.value === ''
342342
? L(attr.name)
343-
: BINARY(L(`${attr.name}="`), '+', BINARY(sanExpr(attr.expr), '+', L('"')))
343+
: BINARY(BINARY(L(`${attr.name}="`), '+', sanExpr(attr.expr)), '+', L('"'))
344344
attrList.push([result, false])
345345
attrListMap.push([L(attr.name), L(1)])
346346
}

0 commit comments

Comments
 (0)