Skip to content

Commit

Permalink
fix: attr inherit case in expression (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
wunci authored Jun 24, 2024
1 parent 795b3e3 commit 096742c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compilers/anode-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)])
}
Expand Down

0 comments on commit 096742c

Please sign in to comment.