empty block to empty statement: {} ==> ;

This commit is contained in:
Mihai Bazon
2012-09-17 12:03:02 +03:00
parent 07f1d56f69
commit 14481de0e9

View File

@@ -759,8 +759,10 @@ function Compressor(options, false_by_default) {
});
AST_BlockStatement.DEFMETHOD("optimize", function(compressor){
if (this.body.length == 1)
return this.body[0];
switch (this.body.length) {
case 1: return this.body[0];
case 0: return make_node(AST_EmptyStatement, this);
}
return this;
});