refactor(transformer): deref SymbolId immediately (#5836)

Tiny refactor. Deref `&SymbolId` to `SymbolId` as early as possible.
This commit is contained in:
overlookmotel 2024-09-18 02:23:35 +00:00
parent 56703a3a59
commit 3dd188c139

View file

@ -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)
});