aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-06-04 19:27:43 +0800
committerGitHub <noreply@github.com>2017-06-04 19:27:43 +0800
commit540220b91bb02d50d04422dc782a5fe1905dd27a (patch)
tree738cb5d7e38ca06fa8c0aed681a448c78b5f9c85 /lib/compress.js
parent84634da4b5e581c36686082b1071fdf646775f49 (diff)
downloadtracifyjs-540220b91bb02d50d04422dc782a5fe1905dd27a.tar.gz
tracifyjs-540220b91bb02d50d04422dc782a5fe1905dd27a.zip
fix `AST_Function` scope invariance (#2052)
improve function name hack in `run_code()`
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 71cffcee..effa6b11 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -2957,7 +2957,7 @@ merge(Compressor.prototype, {
&& !(def.scope.uses_arguments
&& def.orig[0] instanceof AST_SymbolFunarg)
&& !def.scope.uses_eval
- && compressor.find_parent(AST_Scope) === def.scope) {
+ && compressor.find_parent(AST_Scope) === exp.parent_scope) {
self.expression = exp;
}
}