diff --git a/lib/6to5/traverse/index.js b/lib/6to5/traverse/index.js index 3985c421b2..51905eaf0a 100644 --- a/lib/6to5/traverse/index.js +++ b/lib/6to5/traverse/index.js @@ -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);