fix .undeclared (it's now a function)
authorMihai Bazon <mihai@bazon.net>
Mon, 17 Sep 2012 12:06:06 +0000 (15:06 +0300)
committerMihai Bazon <mihai@bazon.net>
Mon, 17 Sep 2012 12:06:06 +0000 (15:06 +0300)
lib/compress.js

index a7472ce..8a2cd4c 100644 (file)
@@ -1219,7 +1219,7 @@ function Compressor(options, false_by_default) {
     AST_Call.DEFMETHOD("optimize", function(compressor){
         if (compressor.option("unsafe")) {
             var exp = this.expression;
-            if (exp instanceof AST_SymbolRef && exp.undeclared) {
+            if (exp instanceof AST_SymbolRef && exp.undeclared()) {
                 switch (exp.name) {
                   case "Array":
                     if (this.args.length != 1) {
@@ -1257,7 +1257,7 @@ function Compressor(options, false_by_default) {
     AST_New.DEFMETHOD("optimize", function(compressor){
         if (compressor.option("unsafe")) {
             var exp = this.expression;
-            if (exp instanceof AST_SymbolRef && exp.undeclared) {
+            if (exp instanceof AST_SymbolRef && exp.undeclared()) {
                 switch (exp.name) {
                   case "Object":
                   case "RegExp":