aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-06-09 12:07:20 +0100
committerGitHub <noreply@github.com>2020-06-09 19:07:20 +0800
commited7c82fa5eeffba48513f017ec8115e88b9638ac (patch)
tree40b60b135061c0bc5a3599d56f7e74bf56f31cde /lib
parent3b273cecac77b672fd5f9a1d02cebc042b4b73ce (diff)
downloadtracifyjs-ed7c82fa5eeffba48513f017ec8115e88b9638ac.tar.gz
tracifyjs-ed7c82fa5eeffba48513f017ec8115e88b9638ac.zip
fix corner case in `collapse_vars` (#3978)
fixes #3976
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 907c9e75..cfbafbe4 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1468,7 +1468,7 @@ merge(Compressor.prototype, {
if (node instanceof AST_Call) {
var fn = node.expression;
if (fn instanceof AST_SymbolRef) {
- if (fn.definition().recursive_refs > 0) return true;
+ if (recursive_ref(compressor, fn.definition())) return true;
fn = fn.fixed_value();
}
if (!(fn instanceof AST_Lambda)) return true;