From 787dfbed644f5b879ca3ae86828782d7ac1e7c38 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sun, 30 Jun 2024 14:00:05 +0300 Subject: [PATCH] enhance `inline` (#5871) --- lib/compress.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/compress.js b/lib/compress.js index dfef0897..0f1ff39b 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -14250,11 +14250,12 @@ Compressor.prototype.compress = function(node) { stat.walk(new TreeWalker(function(node) { if (abort) return true; if (node instanceof AST_Try) { - if (node.bfinally && all(node.body, function(stat) { + if (!node.bfinally) return; + if (all(node.body, function(stat) { stat.walk(find_return); return !abort; }) && node.bcatch) node.bcatch.walk(find_return); - return; + return true; } if (node instanceof AST_Scope) return true; }));