Skip to content

Commit 08412d5

Browse files
perf: remove unneeded nullish check
In the current implementation, `description` is always a string, so there is no point checking if it is not undefined. This closes https://github.com/BitGo/api-ts/security/code-scanning/4
1 parent c45187f commit 08412d5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/openapi-generator/src/jsdoc.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ export function parseCommentBlock(comment: Block): JSDoc {
2727
}
2828
}
2929

30-
if (description !== undefined) {
31-
description = description.trim();
32-
}
30+
description = description.trim();
3331

3432
return {
3533
...(summary.length > 0 ? { summary } : {}),

0 commit comments

Comments
 (0)