diff --git a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs index 2fa8a5e60b2e..df38153d2a18 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs @@ -2990,11 +2990,11 @@ impl VisitMut for Optimizer<'_> { return false; } + debug_assert_valid(&*var); + true }); - debug_assert_valid(&*vars); - let uses_eval = self.data.scopes.get(&self.ctx.scope).unwrap().has_eval_call; if !uses_eval && !self.ctx.dont_use_prepend_nor_append {