aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-26 17:30:05 +0000
committerGitHub <noreply@github.com>2021-01-27 01:30:05 +0800
commitd0bb1476397d2cf6f240267aa003fe6edc445683 (patch)
treea91cafad84bf927cc5d57048bdf83daacb4ad0fb /lib/compress.js
parent4723b4541e08fe9bdafbcae723e8e9cca65fa83f (diff)
downloadtracifyjs-d0bb1476397d2cf6f240267aa003fe6edc445683.tar.gz
tracifyjs-d0bb1476397d2cf6f240267aa003fe6edc445683.zip
fix corner case in `inline` (#4596)
fixes #4595
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 ac380cf3..a662b991 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -8270,7 +8270,7 @@ merge(Compressor.prototype, {
if (can_inline
&& !fn.uses_arguments
&& !fn.pinned()
- && !(fn.name && fn instanceof AST_Function)
+ && !(fn.name && is_function(fn))
&& (exp === fn || !recursive_ref(compressor, def = exp.definition())
&& fn.is_constant_expression(find_scope(compressor)))
&& !has_spread