Skip to content

Commit 9d75aa0

Browse files
committed
fix: remove return
1 parent 94807e0 commit 9d75aa0

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/comments.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function forEachComment(
4949

5050
for (const token of iterateTokens(node, sourceFile)) {
5151
if (token.pos === token.end) {
52-
return;
52+
continue;
5353
}
5454

5555
if (token.kind !== ts.SyntaxKind.JsxText) {
@@ -62,11 +62,7 @@ export function forEachComment(
6262
}
6363

6464
if (notJsx || canHaveTrailingTrivia(token)) {
65-
return ts.forEachTrailingCommentRange(
66-
fullText,
67-
token.end,
68-
commentCallback,
69-
);
65+
ts.forEachTrailingCommentRange(fullText, token.end, commentCallback);
7066
}
7167
}
7268

0 commit comments

Comments
 (0)