Skip to content

Commit

Permalink
Optimize CustomBindingCollector
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 19, 2024
1 parent 2400375 commit da29ad0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/swc_ecma_transforms_base/src/rename/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,14 @@ where
fn visit_expr(&mut self, node: &Expr) {
let old = self.is_pat_decl;
self.is_pat_decl = false;
maybe_grow_default(|| node.visit_children_with(self));
node.visit_children_with(self);
self.is_pat_decl = old;
}

fn visit_bin_expr(&mut self, node: &BinExpr) {
maybe_grow_default(|| node.visit_children_with(self));
}

fn visit_fn_decl(&mut self, node: &FnDecl) {
node.visit_children_with(self);

Expand Down

0 comments on commit da29ad0

Please sign in to comment.