empty block to empty statement: {} ==> ;
This commit is contained in:
@@ -759,8 +759,10 @@ function Compressor(options, false_by_default) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
AST_BlockStatement.DEFMETHOD("optimize", function(compressor){
|
AST_BlockStatement.DEFMETHOD("optimize", function(compressor){
|
||||||
if (this.body.length == 1)
|
switch (this.body.length) {
|
||||||
return this.body[0];
|
case 1: return this.body[0];
|
||||||
|
case 0: return make_node(AST_EmptyStatement, this);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user