stay safe with constants in IE8- (#1547)
- `undefined` etc. can be redefined at top-level for IE8-, so disable related optimisations - fixed `--support-ie8` catch mangle bug
This commit is contained in:
@@ -3348,7 +3348,9 @@ merge(Compressor.prototype, {
|
||||
return def;
|
||||
}
|
||||
// testing against !self.scope.uses_with first is an optimization
|
||||
if (self.undeclared() && !isLHS(self, compressor.parent())
|
||||
if (compressor.option("screw_ie8")
|
||||
&& self.undeclared()
|
||||
&& !isLHS(self, compressor.parent())
|
||||
&& (!self.scope.uses_with || !compressor.find_parent(AST_With))) {
|
||||
switch (self.name) {
|
||||
case "undefined":
|
||||
|
||||
Reference in New Issue
Block a user