fix corner case in if_return (#3601)

fixes #3600
This commit is contained in:
Alex Lam S.L
2019-11-19 15:45:20 +08:00
committed by GitHub
parent 67278e76c8
commit d959e0b86f
2 changed files with 32 additions and 0 deletions

View File

@@ -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;
}