aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-01 02:39:40 +0000
committerGitHub <noreply@github.com>2021-01-01 10:39:40 +0800
commit311c074622e0aabbd79b0d701c19f21b8b093b77 (patch)
tree7aace77db4792459c6d1a788bb25e95533d17e8a /lib/compress.js
parenta10c7793bb282a4023337c08c623b7607921655f (diff)
downloadtracifyjs-311c074622e0aabbd79b0d701c19f21b8b093b77.tar.gz
tracifyjs-311c074622e0aabbd79b0d701c19f21b8b093b77.zip
fix corner case in `functions` (#4488)
fixes #4487
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 531c9aad..6c26e8a9 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -5659,7 +5659,7 @@ merge(Compressor.prototype, {
var defun = make_node(AST_Defun, def, def.value);
defun.name = make_node(AST_SymbolDefun, def.name, def.name);
var name_def = def.name.scope.resolve().def_function(defun.name);
- if (old_def) old_def.references.forEach(function(node) {
+ if (old_def) old_def.forEach(function(node) {
node.name = name_def.name;
node.thedef = name_def;
node.reference({});