From 12eddf472523f4190e2ef0fed67ccfc7ddc449b2 Mon Sep 17 00:00:00 2001 From: Mark Lundin Date: Fri, 13 Sep 2024 15:52:30 +0100 Subject: [PATCH] Added check incase of missing jsdoc tag --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 0761c04..f8a1429 100644 --- a/src/index.js +++ b/src/index.js @@ -209,7 +209,7 @@ export class JSDocParser { const namePos = ts.getLineAndCharacterOfPosition(member.getSourceFile(), member.name.getStart()); - const jsdocNode = member.jsDoc[member.jsDoc.length - 1]; + const jsdocNode = member.jsDoc && member.jsDoc[member.jsDoc.length - 1]; const jsdocPos = jsdocNode ? ts.getLineAndCharacterOfPosition(member.getSourceFile(), jsdocNode.getStart()) : null; const data = {