Skip to content

Commit

Permalink
Move down
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 11, 2023
1 parent e782490 commit 2793655
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/swc_ecma_minifier/src/compress/optimize/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ where
return;
}

should_preserve |= !self.options.top_level() && usage.is_top_level;

if self.data.top.used_arguments && usage.declared_as_fn_param {
return;
}
Expand Down Expand Up @@ -98,6 +96,8 @@ where
let is_inline_enabled =
self.options.reduce_vars || self.options.collapse_vars || self.options.inline != 0;

should_preserve |= !self.options.top_level() && usage.is_top_level;

self.vars.inline_with_multi_replacer(init);

// We inline arrays partially if it's pure (all elements are literal), and not
Expand Down

0 comments on commit 2793655

Please sign in to comment.