public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db66eca
)
Fix compressing `do {...} while (false)`
author
Mihai Bazon
<mihai@bazon.net>
Tue, 19 Feb 2013 16:12:19 +0000
(18:12 +0200)
committer
Mihai Bazon
<mihai@bazon.net>
Tue, 19 Feb 2013 16:12:19 +0000
(18:12 +0200)
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
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
ca23c40
..
3d9097e
100644
(file)
--- 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;