Skip to content

Commit

Permalink
Use it
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Oct 19, 2022
1 parent 13decdf commit 6cb4b67
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/swc_ecma_minifier/src/compress/optimize/sequences.rs
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,15 @@ where
// TODO(kdy1): Paramters with default value can have side effect. But this
// is very unrealistic in real-world code, so I'm
// postponing handling for it.
Mergable::FnDecl(..) => {}
Mergable::FnDecl(f) => {
if f.function
.params
.iter()
.any(|p| !self.is_pat_skippable_for_seq(Some(a), &p.pat))
{
break;
}
}
}
}
}
Expand Down

0 comments on commit 6cb4b67

Please sign in to comment.