From: Mihai Bazon Date: Wed, 20 Aug 2014 06:16:34 +0000 (+0300) Subject: Prevent error for Function(""). Close #538 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=548beeb6b1fee91404a0c41bf9661604995cc59c;p=UglifyJS.git Prevent error for Function(""). Close #538 --- diff --git a/lib/compress.js b/lib/compress.js index fd3f7a21..1e99f158 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1745,6 +1745,7 @@ merge(Compressor.prototype, { } catch(ex) { if (ex !== ast) throw ex; }; + if (!fun) return self; var args = fun.argnames.map(function(arg, i){ return make_node(AST_String, self.args[i], { value: arg.print_to_string()