Skip to content

Commit 48d83ab

Browse files
committed
Remove redundant check in static_property_info
Same as #11882.
1 parent 024c71e commit 48d83ab

File tree

1 file changed

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

1 file changed

+1
-3
lines changed

crates/oxc_ast/src/ast_impl/js.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,9 +675,7 @@ impl<'a> ComputedMemberExpression<'a> {
675675
pub fn static_property_info(&self) -> Option<(Span, &'a str)> {
676676
match &self.expression {
677677
Expression::StringLiteral(lit) => Some((lit.span, lit.value.as_str())),
678-
Expression::TemplateLiteral(lit)
679-
if lit.expressions.is_empty() && lit.quasis.len() == 1 =>
680-
{
678+
Expression::TemplateLiteral(lit) if lit.quasis.len() == 1 => {
681679
lit.quasis[0].value.cooked.map(|cooked| (lit.span, cooked.as_str()))
682680
}
683681
Expression::RegExpLiteral(lit) => lit.raw.map(|raw| (lit.span, raw.as_str())),

0 commit comments

Comments
 (0)