Skip to content

Commit 29bf3ac

Browse files
committed
Revert "fix"
This reverts commit ae60eff.
1 parent 450cb31 commit 29bf3ac

File tree

1 file changed

+1
-8
lines changed
  • crates/swc_ecma_minifier/src/compress/optimize

1 file changed

+1
-8
lines changed

crates/swc_ecma_minifier/src/compress/optimize/inline.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,7 @@ impl Optimizer<'_> {
259259

260260
Expr::Lit(lit) => match lit {
261261
Lit::Str(s) => {
262-
// If the string literal is declared without initializer and assigned
263-
// once, we can inline it.
264-
if (ref_count == 1
265-
|| (ref_count == 2
266-
&& usage.assign_count == 1
267-
&& !usage.flags.intersects(VarUsageInfoFlags::REASSIGNED)))
268-
|| s.value.len() <= 3
269-
{
262+
if ref_count == 1 || s.value.len() <= 3 {
270263
true
271264
} else {
272265
self.vars

0 commit comments

Comments
 (0)