Skip to content

Commit

Permalink
Fix compressing do {...} while (false)
Browse files Browse the repository at this point in the history
It's not safe to transform it to {...} because the body might contain
`break`.  The solution could be more elaborate (detect if body contains
`break`) but I don't think it's worth the trouble.

Close #129
  • Loading branch information
mishoo committed Feb 19, 2013
1 parent db66eca commit 3a591c4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,6 @@ merge(Compressor.prototype, {
extract_declarations_from_unreachable_code(compressor, self.body, a);
return make_node(AST_BlockStatement, self, { body: a });
}
} else {
return self.body;
}
}
return self;
Expand Down

0 comments on commit 3a591c4

Please sign in to comment.