Skip to content

Commit 25ee137

Browse files
committed
fix(ast): MemberExpression::static_property_info use cooked not raw for TemplateElements
1 parent 3e1d6cf commit 25ee137

File tree

1 file changed

+1
-1
lines changed
  • crates/oxc_ast/src/ast_impl

1 file changed

+1
-1
lines changed

crates/oxc_ast/src/ast_impl/js.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ impl<'a> MemberExpression<'a> {
615615
Expression::StringLiteral(lit) => Some((lit.span, lit.value.as_str())),
616616
Expression::TemplateLiteral(lit) => {
617617
if lit.expressions.is_empty() && lit.quasis.len() == 1 {
618-
Some((lit.span, lit.quasis[0].value.raw.as_str()))
618+
lit.quasis[0].value.cooked.map(|cooked| (lit.span, cooked.as_str()))
619619
} else {
620620
None
621621
}

0 commit comments

Comments
 (0)