Skip to content

Commit f77f647

Browse files
committed
cleaning up extra check for existence of variable
1 parent c39e874 commit f77f647

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/slangPrinter.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ import type { PrintFunction } from './types.d.ts';
88
function hasNodeIgnoreComment({ comments }: StrictAstNode): boolean {
99
// Prettier sets SourceUnit's comments to undefined after assigning comments
1010
// to each node.
11-
return (
12-
comments &&
13-
comments.some(
14-
(comment) =>
15-
comment.value
16-
.slice(2, isBlockComment(comment) ? -2 : undefined)
17-
.trim() === 'prettier-ignore'
18-
)
11+
return comments?.some(
12+
(comment) =>
13+
comment.value
14+
.slice(2, isBlockComment(comment) ? -2 : undefined)
15+
.trim() === 'prettier-ignore'
1916
);
2017
}
2118

0 commit comments

Comments
 (0)