Skip to content

Commit

Permalink
fix: unsafe usage of declaration (Close TypeStrong#2175)
Browse files Browse the repository at this point in the history
  • Loading branch information
loopingz committed Feb 20, 2023
1 parent c565bc6 commit e22fdb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/converter/comments/index.ts
Expand Up @@ -176,6 +176,9 @@ export function getJsDocComment(
config: CommentParserConfig,
logger: Logger
): Comment | undefined {
if (!declaration) {
return undefined;
}
const file = declaration.getSourceFile();

// First, get the whole comment. We know we'll need all of it.
Expand Down

0 comments on commit e22fdb0

Please sign in to comment.