Skip to content

Commit

Permalink
Real fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 5, 2023
1 parent 2854f7b commit e84144a
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions crates/swc_ecma_transforms_base/src/rename/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,13 @@ where

self.unresolved = self.get_unresolved(m, has_eval);

let map = self.get_map(m, false, true, has_eval);

if has_eval {
m.visit_mut_children_with(self);
}

{
let map = self.get_map(m, false, true, has_eval);

m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
}
m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
}

fn visit_mut_script(&mut self, m: &mut Script) {
Expand All @@ -261,15 +259,13 @@ where

self.unresolved = self.get_unresolved(m, has_eval);

let map = self.get_map(m, false, true, has_eval);

if has_eval {
m.visit_mut_children_with(self);
}

{
let map = self.get_map(m, false, true, has_eval);

m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
}
m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
}
}

Expand Down

0 comments on commit e84144a

Please sign in to comment.