From: Mihai Bazon Date: Mon, 17 Sep 2012 12:06:06 +0000 (+0300) Subject: fix .undeclared (it's now a function) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e370e3b5a4fcde13402f910a34b736847fe49a9e;p=UglifyJS.git fix .undeclared (it's now a function) --- diff --git a/lib/compress.js b/lib/compress.js index a7472ce7..8a2cd4cd 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -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":