fix performance regression (#5302)

fixes #5297
This commit is contained in:
Alex Lam S.L
2022-01-17 03:49:47 +00:00
committed by GitHub
parent 774feeadb8
commit 43807c26fb
2 changed files with 9 additions and 7 deletions

View File

@@ -13262,8 +13262,7 @@ Compressor.prototype.compress = function(node) {
def(AST_New, noop);
def(AST_Return, function(compressor, scope, no_return, in_loop) {
var value = this.value;
if (value) value = value.try_inline(compressor, scope, undefined, in_loop === "try");
return value || this;
return value && value.try_inline(compressor, scope, undefined, in_loop === "try");
});
function inline_sequence(compressor, scope, no_return, in_loop, node, skip) {
var body = [], exprs = node.expressions, no_ret = no_return;