backport of #2835 (#2841)
authorAlex Lam S.L <alexlamsl@gmail.com>
Mon, 22 Jan 2018 21:45:45 +0000 (05:45 +0800)
committerGitHub <noreply@github.com>
Mon, 22 Jan 2018 21:45:45 +0000 (05:45 +0800)
lib/compress.js

index a8fa0e1..33b4313 100644 (file)
@@ -1642,7 +1642,7 @@ merge(Compressor.prototype, {
             var stat = null;
             for (var i = 0, len = block.body.length; i < len; i++) {
                 var line = block.body[i];
-                if (line instanceof AST_Definitions && declarations_only(line)) {
+                if (line instanceof AST_Var && declarations_only(line)) {
                     decls.push(line);
                 } else if (stat) {
                     return false;