From 5af144522a6fea302abdd0b63d48864de0664207 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Sat, 20 Apr 2013 15:11:05 -0500 Subject: fixes #189: use dotted member access when --screw-ie8 option given --- bin/uglifyjs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'bin/uglifyjs') diff --git a/bin/uglifyjs b/bin/uglifyjs index f20976d4..aecc0726 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -114,20 +114,21 @@ if (ARGS.acorn) { acorn = require("acorn"); } -var COMPRESS = getOptions("c", true); -var MANGLE = getOptions("m", true); +var COMPRESS = getOptions("c", true) || {}; +var MANGLE = getOptions("m", true) || {}; var BEAUTIFY = getOptions("b", true); -if (COMPRESS && ARGS.d) { +if (ARGS.d) { COMPRESS.global_defs = getOptions("d"); } -if (MANGLE && ARGS.r) { - MANGLE.except = ARGS.r.replace(/^\s+|\s+$/g).split(/\s*,+\s*/); +if (ARGS.screw_ie8) { + COMPRESS.screw_ie8 = true; + MANGLE.screw_ie8 = true; } -if (MANGLE && ARGS.screw_ie8) { - MANGLE.screw_ie8 = true; +if (ARGS.r) { + MANGLE.except = ARGS.r.replace(/^\s+|\s+$/g).split(/\s*,+\s*/); } var OUTPUT_OPTIONS = { -- cgit v1.2.3