Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyuanzmj committed Dec 31, 2024
1 parent 37057c4 commit 4e47c5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/babel-plugin-jsx/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ export const isConstant = (
isConstant((property as any).value)
);
}
if (!t.isTemplateLiteral(node) && t.isLiteral(node)) {
if (
t.isTemplateLiteral(node) ? !node.expressions.length : t.isLiteral(node)
) {
return true;
}
return false;
Expand Down

0 comments on commit 4e47c5f

Please sign in to comment.