From: Mihai Bazon Date: Thu, 11 Oct 2012 07:28:48 +0000 (+0300) Subject: fix propagation of symbol references X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5053a29bc0b723bbf468f50e0434c3eff38600e2;p=UglifyJS.git fix propagation of symbol references --- diff --git a/lib/scope.js b/lib/scope.js index cd480841..40237b39 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -226,6 +226,7 @@ AST_SymbolRef.DEFMETHOD("reference", function() { var s = this.scope; while (s) { push_uniq(s.enclosed, def); + if (s === def.scope) break; s = s.parent_scope; } });