aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-07 14:40:41 +0000
committerGitHub <noreply@github.com>2021-02-07 22:40:41 +0800
commitc44b6399c30b043f9bf687ce9b44458abc211d80 (patch)
treeba9776f601cf502c5dca00fbd8bacb7536382bd0 /lib
parent522cceeccf7f66bffaa71f60a678b3fdfede94bf (diff)
downloadtracifyjs-c44b6399c30b043f9bf687ce9b44458abc211d80.tar.gz
tracifyjs-c44b6399c30b043f9bf687ce9b44458abc211d80.zip
fix corner case in `side_effects` (#4622)
fixes #4621
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js2
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;