Stringify the argument before trying to parse it.

This commit is contained in:
Sergey Zakharchenko 2015-04-29 08:36:29 +03:00
parent 92e4340732
commit a1ae0cd2d0

View File

@ -476,7 +476,7 @@ function getOptions(x, constants) {
if (x !== "") {
var ast;
try {
ast = UglifyJS.parse(x, { expression: true });
ast = UglifyJS.parse(x + "", { expression: true });
} catch(ex) {
if (ex instanceof UglifyJS.JS_Parse_Error) {
sys.error("Error parsing arguments in: " + x);