remove comments in traverse.removeProperties

This commit is contained in:
Sebastian McKenzie
2014-10-31 21:22:28 +11:00
parent 622bb2e962
commit 6e7b8a14fe

View File

@@ -80,6 +80,16 @@ traverse.removeProperties = function (tree) {
delete node.start;
delete node.end;
delete node.loc;
clearComments(node.trailingComments);
clearComments(node.leadingComments);
};
var clearComments = function (comments) {
_.each(comments, function (comment) {
delete comment.extendedRange;
clear(comment);
});
};
clear(tree);