return undefined optimization no longer uses return_void_0 option

This commit is contained in:
kzc
2015-10-28 17:51:46 -04:00
committed by Richard van Velzen
parent 841a661071
commit bd0ae6569f
2 changed files with 3 additions and 147 deletions

View File

@@ -65,7 +65,6 @@ function Compressor(options, false_by_default) {
keep_fnames : false,
hoist_vars : false,
if_return : !false_by_default,
return_void_0 : !false_by_default,
join_vars : !false_by_default,
cascade : !false_by_default,
side_effects : !false_by_default,
@@ -2521,10 +2520,8 @@ merge(Compressor.prototype, {
OPT(AST_RegExp, literals_in_boolean_context);
OPT(AST_Return, function(self, compressor){
if (compressor.option("return_void_0")) {
if (self.value instanceof AST_Undefined) {
self.value = null;
}
if (self.value instanceof AST_Undefined) {
self.value = null;
}
return self;
});