diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-02-07 14:40:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 22:40:41 +0800 |
commit | c44b6399c30b043f9bf687ce9b44458abc211d80 (patch) | |
tree | ba9776f601cf502c5dca00fbd8bacb7536382bd0 /lib | |
parent | 522cceeccf7f66bffaa71f60a678b3fdfede94bf (diff) | |
download | tracifyjs-c44b6399c30b043f9bf687ce9b44458abc211d80.tar.gz tracifyjs-c44b6399c30b043f9bf687ce9b44458abc211d80.zip |
fix corner case in `side_effects` (#4622)
fixes #4621
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index 7a6a0bcb..afb555f0 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -8295,7 +8295,7 @@ merge(Compressor.prototype, { if (has_arg_refs(argname)) return false; } return true; - }); + }) && !(fn.rest instanceof AST_Destructured && has_arg_refs(fn.rest)); var can_inline = can_drop && compressor.option("inline") && !self.is_expr_pure(compressor); if (can_inline && stat instanceof AST_Return) { var value = stat.value; |