Skip to content

Commit e84144a

Browse files
committed
Real fix
1 parent 2854f7b commit e84144a

File tree

1 file changed

+6
-10
lines changed
  • crates/swc_ecma_transforms_base/src/rename

1 file changed

+6
-10
lines changed

crates/swc_ecma_transforms_base/src/rename/mod.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,13 @@ where
243243

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

246+
let map = self.get_map(m, false, true, has_eval);
247+
246248
if has_eval {
247249
m.visit_mut_children_with(self);
248250
}
249251

250-
{
251-
let map = self.get_map(m, false, true, has_eval);
252-
253-
m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
254-
}
252+
m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
255253
}
256254

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

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

262+
let map = self.get_map(m, false, true, has_eval);
263+
264264
if has_eval {
265265
m.visit_mut_children_with(self);
266266
}
267267

268-
{
269-
let map = self.get_map(m, false, true, has_eval);
270-
271-
m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
272-
}
268+
m.visit_mut_with(&mut rename_with_config(&map, self.config.clone()));
273269
}
274270
}
275271

0 commit comments

Comments
 (0)