From d959e0b86ff36156be2e7ec2cffdd57f1e30e8dd Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 19 Nov 2019 15:45:20 +0800 Subject: fix corner case in `if_return` (#3601) fixes #3600 --- lib/compress.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/compress.js') diff --git a/lib/compress.js b/lib/compress.js index 8c1ed5b3..4ce283da 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1805,6 +1805,7 @@ merge(Compressor.prototype, { stat.alternative = make_node(AST_BlockStatement, stat, { body: body }); + statements[i] = stat; statements[i] = stat.transform(compressor); continue; } @@ -1817,6 +1818,7 @@ merge(Compressor.prototype, { stat.condition = negated; statements[j] = stat.body; stat.body = next; + statements[i] = stat; statements[i] = stat.transform(compressor); continue; } @@ -1834,6 +1836,7 @@ merge(Compressor.prototype, { stat.alternative = make_node(AST_BlockStatement, stat.alternative, { body: body }); + statements[i] = stat; statements[i] = stat.transform(compressor); continue; } -- cgit v1.2.3