Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 7, 2024
1 parent 8dbdd0a commit 918aa56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/src/compress/optimize/unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ impl Optimizer<'_> {

/// `var Parser = function Parser() {};` => `var Parser = function () {}`
pub(super) fn remove_duplicate_name_of_function(&mut self, v: &mut VarDeclarator) {
if !self.options.unused {
if !self.options.unused || self.options.hoist_props {
return;
}

Expand Down

0 comments on commit 918aa56

Please sign in to comment.