diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-02-05 20:03:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 20:03:22 +0000 |
commit | c93ca6ee5386f824e60bea6563d249c13854f171 (patch) | |
tree | 81db56d3b951a00a9334fab457a776af371cd9e9 /lib | |
parent | df506439b16c550f7e8da30b392f17b0ca4c2e4a (diff) | |
download | tracifyjs-c93ca6ee5386f824e60bea6563d249c13854f171.tar.gz tracifyjs-c93ca6ee5386f824e60bea6563d249c13854f171.zip |
fix corner case in `ie8` & `reduce_vars` (#3706)
fixes #3703
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compress.js b/lib/compress.js index 32d0b67d..b190ef9c 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -6964,9 +6964,9 @@ merge(Compressor.prototype, { var fn = node.fixed_value(); if (!(fn instanceof AST_Lambda)) return; if (!fn.name) return; - var fn_def = fn.name.definition(); - if (fn_def.scope !== fn.name.scope) return; - if (fixed.variables.get(fn.name.name) !== fn_def) return; + if (fn.name.definition() !== def) return; + if (def.scope !== fn.name.scope) return; + if (fixed.variables.get(fn.name.name) !== def) return; fn.name = fn.name.clone(); var value_def = value.variables.get(fn.name.name) || value.def_function(fn.name); node.thedef = value_def; |