Skip to content

Commit

Permalink
update var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Aug 23, 2024
1 parent 6059bec commit 4e47705
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/oxc_transformer/src/es2019/optional_catch_binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ impl<'a> Traverse<'a> for OptionalCatchBinding<'a> {
return;
}

// Get the BlockStatement scope_id below the CatchClause scope
let child_scope_id = clause.body.scope_id.get().unwrap();
let block_scope_id = clause.body.scope_id.get().unwrap();
let symbol_id = ctx.generate_uid(
"unused",
child_scope_id,
block_scope_id,
SymbolFlags::CatchVariable | SymbolFlags::FunctionScopedVariable,
);
let name = ctx.ast.atom(ctx.symbols().get_name(symbol_id));
Expand Down

0 comments on commit 4e47705

Please sign in to comment.