@@ -386,13 +386,14 @@ function OutputStream(options) {
|
|||||||
var comments = start.comments_before || [];
|
var comments = start.comments_before || [];
|
||||||
|
|
||||||
// XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112
|
// XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112
|
||||||
// if this node is `return` or `throw`, we cannot allow comments before
|
// and https://github.com/mishoo/UglifyJS2/issues/372
|
||||||
// the returned or thrown value.
|
if (self instanceof AST_Exit && self.value) {
|
||||||
if (self instanceof AST_Exit && self.value
|
self.value.walk(new TreeWalker(function(node){
|
||||||
&& self.value.start.comments_before
|
if (node.start.comments_before) {
|
||||||
&& self.value.start.comments_before.length > 0) {
|
comments = comments.concat(node.start.comments_before);
|
||||||
comments = comments.concat(self.value.start.comments_before);
|
node.start.comments_before = [];
|
||||||
self.value.start.comments_before = [];
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.test) {
|
if (c.test) {
|
||||||
|
|||||||
Reference in New Issue
Block a user