From 4f8ca4626efb15dc986785c89c51cbb3061e5f32 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 8 May 2017 03:24:42 +0800 Subject: deprecate low level API (#1877) fixes #1872 --- bin/uglifyjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/uglifyjs b/bin/uglifyjs index c4f9dc5d..b67eb6ba 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -89,7 +89,7 @@ if (program.mangleProps) { if (typeof program.mangleProps != "object") program.mangleProps = {}; if (!Array.isArray(program.mangleProps.reserved)) program.mangleProps.reserved = []; require("../tools/domprops").forEach(function(name) { - UglifyJS.push_uniq(program.mangleProps.reserved, name); + UglifyJS._push_uniq(program.mangleProps.reserved, name); }); } if (typeof options.mangle != "object") options.mangle = {}; @@ -187,7 +187,7 @@ function run() { } var result = UglifyJS.minify(files, options); } catch (ex) { - if (ex instanceof UglifyJS.JS_Parse_Error) { + if (ex.name == "SyntaxError") { console.error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col); var col = ex.col; var lines = files[ex.filename].split(/\r?\n/); -- cgit v1.2.3