fix bug (forgot arg name)
authorMihai Bazon <mihai@bazon.net>
Fri, 7 Sep 2012 13:02:08 +0000 (16:02 +0300)
committerMihai Bazon <mihai@bazon.net>
Fri, 7 Sep 2012 13:02:08 +0000 (16:02 +0300)
lib/compress.js

index ea0218e..953fd90 100644 (file)
@@ -423,7 +423,7 @@ function Compressor(options, false_by_default) {
             self.second = self.second.negate(compressor);
             return self;
         });
-        def(AST_Conditional, function(){
+        def(AST_Conditional, function(compressor){
             var self = this.clone();
             self.consequent = self.consequent.negate(compressor);
             self.alternative = self.alternative.negate(compressor);
@@ -703,7 +703,7 @@ function Compressor(options, false_by_default) {
             && self.alternative instanceof AST_EmptyStatement) {
             return make_node(AST_SimpleStatement, self.condition, {
                 body: self.condition
-            });
+            }).optimize(compressor);
         }
         if (self.body instanceof AST_SimpleStatement
             && self.alternative instanceof AST_SimpleStatement) {