chore: update

This commit is contained in:
zhiyuanzmj 2024-12-31 09:27:47 +08:00
parent 37057c4f4a
commit 4e47c5fc04

View File

@ -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;