Skip to content

Commit

Permalink
refactor(transformer): deref SymbolId immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Sep 17, 2024
1 parent 33f255c commit 78e0db2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_transformer/src/es2015/arrow_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ impl<'a> ArrowFunctions<'a> {
let this_var = self.this_var_stack.last_mut().unwrap();
if this_var.is_none() {
let target_scope_id =
ctx.scopes().ancestors(ctx.current_scope_id()).skip(1).find(|scope_id| {
let scope_flags = ctx.scopes().get_flags(*scope_id);
ctx.scopes().ancestors(ctx.current_scope_id()).skip(1).find(|&scope_id| {
let scope_flags = ctx.scopes().get_flags(scope_id);
scope_flags.intersects(ScopeFlags::Function | ScopeFlags::Top)
&& !scope_flags.contains(ScopeFlags::Arrow)
});
Expand Down

0 comments on commit 78e0db2

Please sign in to comment.