fixes #189: use dotted member access when --screw-ie8 option given

This commit is contained in:
Michael Ficarra
2013-04-20 15:11:05 -05:00
parent 4b818056cf
commit 5af144522a
3 changed files with 25 additions and 8 deletions

View File

@@ -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