From 79c60032a55b518e07acb45237e527b4fe61c8e6 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 30 Jan 2020 09:04:44 +0800 Subject: fix corner case in `collapse_vars` (#3701) fixes #3700 --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/compress.js b/lib/compress.js index e6a064dd..5d14963f 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1395,7 +1395,7 @@ merge(Compressor.prototype, { var rhs_fn = scan_rhs; for (var i = 0; !abort && i < fn.body.length; i++) { var stat = fn.body[i]; - if (stat instanceof AST_Exit) { + if (stat instanceof AST_Return) { if (stat.value) stat.value.transform(scanner); break; } -- cgit v1.2.3