File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
crates/oxc_ast/src/ast_impl Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ impl<'a> MemberExpression<'a> {
614614 MemberExpression :: ComputedMemberExpression ( expr) => match & expr. expression {
615615 Expression :: StringLiteral ( lit) => Some ( ( lit. span , lit. value . as_str ( ) ) ) ,
616616 Expression :: TemplateLiteral ( lit) => {
617- if lit. expressions . is_empty ( ) && lit . quasis . len ( ) == 1 {
617+ if lit. quasis . len ( ) == 1 {
618618 lit. quasis [ 0 ] . value . cooked . map ( |cooked| ( lit. span , cooked. as_str ( ) ) )
619619 } else {
620620 None
@@ -659,11 +659,7 @@ impl<'a> ComputedMemberExpression<'a> {
659659 pub fn static_property_name ( & self ) -> Option < Atom < ' a > > {
660660 match & self . expression {
661661 Expression :: StringLiteral ( lit) => Some ( lit. value ) ,
662- Expression :: TemplateLiteral ( lit)
663- if lit. expressions . is_empty ( ) && lit. quasis . len ( ) == 1 =>
664- {
665- lit. quasis [ 0 ] . value . cooked
666- }
662+ Expression :: TemplateLiteral ( lit) if lit. quasis . len ( ) == 1 => lit. quasis [ 0 ] . value . cooked ,
667663 Expression :: RegExpLiteral ( lit) => lit. raw ,
668664 _ => None ,
669665 }
You can’t perform that action at this time.
0 commit comments