aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
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 /lib/compress.js
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 'lib/compress.js')
-rw-r--r--lib/compress.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 216826d6..ebd3dd7a 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -66,6 +66,7 @@ function Compressor(options, false_by_default) {
join_vars : !false_by_default,
cascade : !false_by_default,
side_effects : !false_by_default,
+ screw_ie8 : false,
warnings : true,
global_defs : {}
@@ -1961,7 +1962,7 @@ merge(Compressor.prototype, {
var prop = self.property;
if (prop instanceof AST_String && compressor.option("properties")) {
prop = prop.getValue();
- if (is_identifier(prop)) {
+ if (is_identifier(prop) || compressor.option("screw_ie8")) {
return make_node(AST_Dot, self, {
expression : self.expression,
property : prop