aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 8eb36191..0e8b495f 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -4542,7 +4542,7 @@ merge(Compressor.prototype, {
}
if (node instanceof AST_LabeledStatement) {
push();
- segment.block = node.body;
+ segment.block = node;
node.body.walk(tw);
pop();
return true;
@@ -4737,7 +4737,12 @@ merge(Compressor.prototype, {
function insert(target) {
var stack = [];
- while (!HOP(segment, "block") || segment.block !== target) {
+ while (true) {
+ if (HOP(segment, "block")) {
+ var block = segment.block;
+ if (block instanceof AST_LabeledStatement) block = block.body;
+ if (block === target) break;
+ }
stack.push(segment);
pop();
}