Skip to content

Commit

Permalink
refactor(transformer): RegExp transform unbox early
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Sep 6, 2024
1 parent 24fc0aa commit f4cb42b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/oxc_transformer/src/regexp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ impl<'a> Traverse<'a> for RegExp<'a> {
expr: &mut Expression<'a>,
ctx: &mut oxc_traverse::TraverseCtx<'a>,
) {
let Expression::RegExpLiteral(ref mut regexp) = expr else {
let Expression::RegExpLiteral(regexp) = expr else {
return;
};
let regexp = regexp.as_mut();

let flags = regexp.regex.flags;
let has_unsupported_flags = flags.intersects(self.unsupported_flags);
Expand Down

0 comments on commit f4cb42b

Please sign in to comment.