aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2013-04-21 01:30:02 -0700
committerMihai Bazon <mihai.bazon@gmail.com>2013-04-21 01:30:02 -0700
commit753b4b6cc8aff37b9678b3bc3a883874bf4cac51 (patch)
treec0ec1197c2d52441ce83c61be4df4383403e305e /bin
parenta9c1b9f1385464309247fb2dd299ba6bb90bce10 (diff)
parent5af144522a6fea302abdd0b63d48864de0664207 (diff)
downloadtracifyjs-753b4b6cc8aff37b9678b3bc3a883874bf4cac51.tar.gz
tracifyjs-753b4b6cc8aff37b9678b3bc3a883874bf4cac51.zip
Merge pull request #191 from michaelficarra/use-es5-member-access-with-screw-ie
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 = {