@@ -3209,10 +3209,15 @@ merge(Compressor.prototype, {
|
||||
if (!value) return make_node(AST_Undefined, self);
|
||||
value.walk(new TreeWalker(function(node) {
|
||||
if (value === self) return true;
|
||||
if (node instanceof AST_SymbolRef && exp.variables.has(node.name)) {
|
||||
if (node instanceof AST_SymbolRef && matches(node.scope.find_variable(node))
|
||||
|| node instanceof AST_This && matches(node)) {
|
||||
value = self;
|
||||
return true;
|
||||
}
|
||||
|
||||
function matches(ref) {
|
||||
return ref && ref.scope.parent_scope === fn.parent_scope;
|
||||
}
|
||||
}));
|
||||
if (value !== self) value = best_of(compressor, value, self);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user