diff --git a/CHANGELOG.md b/CHANGELOG.md index 994da0f10..02f81e920 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +### Bug Fixes + +- TypeDoc will no longer crash if a comment contains an empty `@example` tag, #1967. + ## v0.23.2 (2022-06-28) ### Bug Fixes diff --git a/src/lib/converter/comments/parser.ts b/src/lib/converter/comments/parser.ts index 8e9ac80ed..3dc0a96e2 100644 --- a/src/lib/converter/comments/parser.ts +++ b/src/lib/converter/comments/parser.ts @@ -109,7 +109,7 @@ function postProcessComment(comment: Comment, warning: (msg: string) => void) { tag.tag === "@example" && !tag.content.some((part) => part.kind === "code") ) { - const caption = tag.content[0].text.match( + const caption = tag.content[0]?.text.match( /^\s*