diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-12-10 09:45:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-10 09:45:51 +0000 |
commit | 18c2b1841bf0bfa6c827eed53238d0499c143b23 (patch) | |
tree | 9925d4574fc7cca83f446011e385589f212cf48a /lib | |
parent | fe19ab7c57de1f3ba717ecd531e0e3f34c591a01 (diff) | |
download | tracifyjs-18c2b1841bf0bfa6c827eed53238d0499c143b23.tar.gz tracifyjs-18c2b1841bf0bfa6c827eed53238d0499c143b23.zip |
fix corner case in `reduce_vars` (#3632)
fixes #3631
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js index a34272ca..6d398de2 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -648,7 +648,7 @@ merge(Compressor.prototype, { tw.in_loop = this; push(tw); this.body.walk(tw); - if (has_break_or_continue(this)) { + if (has_break_or_continue(this, tw.parent())) { pop(tw); push(tw); } @@ -665,7 +665,7 @@ merge(Compressor.prototype, { if (this.condition) this.condition.walk(tw); this.body.walk(tw); if (this.step) { - if (has_break_or_continue(this)) { + if (has_break_or_continue(this, tw.parent())) { pop(tw); push(tw); } |