fix: lost leading comment after named import (#10901)

* create test for 10892

* update expected output

* fixed #10892

* add colon to restart build

* remove colon as it makes tests fail
This commit is contained in:
Barthélémy Ledoux
2019-12-22 03:22:28 -06:00
committed by Nicolò Ribaudo
parent 416ce35638
commit f651f22f96
4 changed files with 219 additions and 5 deletions

View File

@@ -174,11 +174,9 @@ export default class CommentsParser extends BaseParser {
(this.state.commentPreviousNode.type === "ExportSpecifier" &&
node.type !== "ExportSpecifier"))
) {
this.adjustCommentsAfterTrailingComma(
node,
[this.state.commentPreviousNode],
true,
);
this.adjustCommentsAfterTrailingComma(node, [
this.state.commentPreviousNode,
]);
}
if (lastChild) {