aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-05-08 04:49:17 +0100
committerGitHub <noreply@github.com>2020-05-08 11:49:17 +0800
commit7a033bb825975a6a729813b2cbe5a722a9047456 (patch)
tree9a8b20e93b2913b625e6062c5d0524b8c9d56203 /lib
parenta441b009517125fa2e0cdf10150c6fd77bbb54ae (diff)
downloadtracifyjs-7a033bb825975a6a729813b2cbe5a722a9047456.tar.gz
tracifyjs-7a033bb825975a6a729813b2cbe5a722a9047456.zip
fix corner case in `join_vars` (#3857)
fixes #3856
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index ffdd5ccc..4dae2a9f 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -2579,6 +2579,8 @@ merge(Compressor.prototype, {
}
if (node instanceof AST_Scope) return node;
if (!(node instanceof AST_Statement)) return node;
+ }, function(node) {
+ if (node instanceof AST_For && is_empty(node.init)) node.init = null;
}));
}
}