aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichael Ficarra <mficarra@groupon.com>2013-04-20 15:11:05 -0500
committerMichael Ficarra <mficarra@groupon.com>2013-04-20 15:11:05 -0500
commit5af144522a6fea302abdd0b63d48864de0664207 (patch)
tree69291fff13832734c4752f49276f5dcb69a59b94 /bin
parent4b818056cf1a19fe6251e026cac4894f618f0217 (diff)
downloadtracifyjs-5af144522a6fea302abdd0b63d48864de0664207.tar.gz
tracifyjs-5af144522a6fea302abdd0b63d48864de0664207.zip
fixes #189: use dotted member access when --screw-ie8 option given
Diffstat (limited to 'bin')
-rwxr-xr-xbin/uglifyjs15
1 files changed, 8 insertions, 7 deletions
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 = {