diff options
author | Mihai Bazon <mihai@bazon.net> | 2013-02-19 18:12:19 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2013-02-19 18:12:19 +0200 |
commit | 3a591c43fedcf07e9303773dbb0852396729a402 (patch) | |
tree | 3d8001a09845e596c1aa3170d7c1aad07bd0c8ad /lib | |
parent | db66eca958b06e3082014fac95217911bbcfbee3 (diff) | |
download | tracifyjs-3a591c43fedcf07e9303773dbb0852396729a402.tar.gz tracifyjs-3a591c43fedcf07e9303773dbb0852396729a402.zip |
Fix compressing `do {...} while (false)`
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js index ca23c40e..3d9097e2 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -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; |