We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ffeb76 commit 3baf4c9Copy full SHA for 3baf4c9
crates/swc_ecma_minifier/src/compress/optimize/evaluate.rs
@@ -146,13 +146,7 @@ impl Optimizer<'_> {
146
..
147
}) if matches!(obj.as_ref(), Expr::Ident(ident) if &*ident.sym == "Number") => {
148
if let Expr::Ident(number_ident) = &**obj {
149
- if self
150
- .data
151
- .vars
152
- .get(&number_ident.to_id())
153
- .map(|var| var.flags.contains(VarUsageInfoFlags::DECLARED))
154
- .unwrap_or(false)
155
- {
+ if number_ident.ctxt != self.ctx.expr_ctx.unresolved_ctxt {
156
return;
157
}
158
0 commit comments