fix pure_getters on spread of objects (#2275)
This commit is contained in:
@@ -1427,9 +1427,14 @@ merge(Compressor.prototype, {
|
||||
def(AST_Object, function(compressor) {
|
||||
if (!is_strict(compressor)) return false;
|
||||
for (var i = this.properties.length; --i >=0;)
|
||||
if (this.properties[i].value instanceof AST_Accessor) return true;
|
||||
if (this.properties[i]._dot_throw(compressor)) return true;
|
||||
return false;
|
||||
});
|
||||
def(AST_ObjectProperty, return_false);
|
||||
def(AST_ObjectGetter, return_true);
|
||||
def(AST_Expansion, function(compressor) {
|
||||
return this.expression._dot_throw(compressor);
|
||||
});
|
||||
def(AST_Function, return_false);
|
||||
def(AST_Arrow, return_false);
|
||||
def(AST_UnaryPostfix, return_false);
|
||||
|
||||
Reference in New Issue
Block a user