aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-10 00:45:36 +0000
committerGitHub <noreply@github.com>2021-02-10 08:45:36 +0800
commit5e6307974fa2b1e7972ab8c58b636eaed47a54fb (patch)
tree0e1d3f4ac255e46198333c6097884a7159c5dd6f /lib/compress.js
parent228cdf8e7e1dc472813f7def780b8608a4f5f485 (diff)
downloadtracifyjs-5e6307974fa2b1e7972ab8c58b636eaed47a54fb.tar.gz
tracifyjs-5e6307974fa2b1e7972ab8c58b636eaed47a54fb.zip
fix corner case in `collapse_vars` (#4634)
fixes #4633
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 c822a8e7..3fcfe2d2 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -2009,7 +2009,7 @@ merge(Compressor.prototype, {
};
var tw = new TreeWalker(function(node) {
if (!arg) return true;
- if (has_await(node)) {
+ if (has_await(node) || node instanceof AST_Yield) {
arg = null;
return true;
}