Skip to content

Commit

Permalink
Update linter for recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 5, 2024
1 parent 4874660 commit 7eb3802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_linter/src/utils/unicorn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ pub fn is_same_member_expression(
// x[/regex/] === x['/regex/']
(Expression::StringLiteral(string_lit), Expression::RegExpLiteral(regex_lit))
| (Expression::RegExpLiteral(regex_lit), Expression::StringLiteral(string_lit)) => {
if string_lit.value != regex_lit.raw {
if string_lit.value != regex_lit.raw.as_ref().unwrap() {
return false;
}
}
Expand All @@ -296,7 +296,7 @@ pub fn is_same_member_expression(
(Expression::TemplateLiteral(template_lit), Expression::RegExpLiteral(regex_lit))
| (Expression::RegExpLiteral(regex_lit), Expression::TemplateLiteral(template_lit)) => {
if !(template_lit.is_no_substitution_template()
&& template_lit.quasi().unwrap() == regex_lit.raw)
&& template_lit.quasi().unwrap() == regex_lit.raw.as_ref().unwrap())
{
return false;
}
Expand Down

0 comments on commit 7eb3802

Please sign in to comment.