From 6d7ab63a6600c65958f4788dee6da5b2ea43476c Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 25 Feb 2021 04:48:40 +0000 Subject: fix corner cases in `sequences` (#4690) fixes #4689 --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compress.js') diff --git a/lib/compress.js b/lib/compress.js index 2b28c754..08b0987a 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -3118,7 +3118,7 @@ merge(Compressor.prototype, { } } } else if (stat instanceof AST_ForIn) { - stat.object = cons_seq(stat.object); + if (!is_lexical_definition(stat.init)) stat.object = cons_seq(stat.object); } else if (stat instanceof AST_If) { stat.condition = cons_seq(stat.condition); } else if (stat instanceof AST_Switch) { -- cgit v1.2.3