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 01e0122 commit 4b0119b
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 4b0119b

Please sign in to comment.