fix dead_code on for (#2552)
This commit is contained in:
@@ -3128,9 +3128,6 @@ merge(Compressor.prototype, {
|
||||
if (!cond) {
|
||||
var body = [];
|
||||
extract_declarations_from_unreachable_code(compressor, self.body, body);
|
||||
body.push(make_node(AST_SimpleStatement, self.condition, {
|
||||
body: self.condition
|
||||
}));
|
||||
if (self.init instanceof AST_Statement) {
|
||||
body.push(self.init);
|
||||
} else if (self.init) {
|
||||
@@ -3138,6 +3135,9 @@ merge(Compressor.prototype, {
|
||||
body: self.init
|
||||
}));
|
||||
}
|
||||
body.push(make_node(AST_SimpleStatement, self.condition, {
|
||||
body: self.condition
|
||||
}));
|
||||
return make_node(AST_BlockStatement, self, { body: body }).optimize(compressor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user