comments
This commit is contained in:
parent
3a865629ce
commit
044dbd2359
|
|
@ -4875,12 +4875,12 @@ merge(Compressor.prototype, {
|
|||
if (compressor.option("computed_props")
|
||||
&& self.key instanceof AST_Constant // save a comparison in the typical case
|
||||
&& (
|
||||
// whitelist acceptable props as AST_Constants are not all constant
|
||||
// whitelist acceptable props as not all AST_Constants are true constants
|
||||
self.key instanceof AST_String
|
||||
|| self.key instanceof AST_Number
|
||||
)) {
|
||||
self.key = self.key.value;
|
||||
// fallthrough - `return self;` not needed as transformed tree in good form
|
||||
// fallthrough - `return self` not needed as transformed tree in good form
|
||||
}
|
||||
// p:function(){} ---> p(){}
|
||||
// p:function*(){} ---> *p(){}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user