aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-03-13 23:48:52 +0800
committerGitHub <noreply@github.com>2019-03-13 23:48:52 +0800
commitd074aa6e27de77bc60e69b933f90725931c8d5df (patch)
treea2dba2cde17e18a2a9edeb60cb87fec3375776fb /lib/compress.js
parentb052f62710df6b09caca2b82ff2303ad0079be58 (diff)
downloadtracifyjs-d074aa6e27de77bc60e69b933f90725931c8d5df.tar.gz
tracifyjs-d074aa6e27de77bc60e69b933f90725931c8d5df.zip
fix corner case in `collapse_vars` (#3333)
fixes #3247 fixes #3305 fixes #3314 fixes #3327
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index e6446fec..2ccf330d 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1631,7 +1631,7 @@ merge(Compressor.prototype, {
function symbol_in_lvalues(sym, parent) {
var lvalue = lvalues[sym.name];
if (!lvalue) return;
- if (lvalue !== lhs) return !(parent instanceof AST_Call);
+ if (lvalue !== lhs) return !(parent instanceof AST_Call && parent.expression === sym);
scan_rhs = false;
}