Skip to content

Commit c1fb5bd

Browse files
committed
Add #2639 to changelog
1 parent 946ea38 commit c1fb5bd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
- Constructor parameters which share a name with a property on a parent class will no longer inherit the comment on the parent class, #2636.
66
- Packages mode will now attempt to use the comment declared in the comment class for inherited members, #2622.
7+
- TypeDoc no longer crashes when `@document` includes an empty file, #2638.
8+
9+
### Thanks!
10+
11+
- @bladerunner2020
712

813
## v0.26.4 (2024-07-10)
914

src/lib/converter/comments/parser.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ export function parseCommentString(
202202

203203
// Check for frontmatter
204204
let frontmatterData: Record<string, unknown> = {};
205-
const firstBlock = content[0];
206-
if (firstBlock?.text?.startsWith("---\n")) {
205+
const firstBlock = content.at(0);
206+
if (firstBlock?.text.startsWith("---\n")) {
207207
const end = firstBlock.text.indexOf("\n---\n");
208208
if (end !== -1) {
209209
const yamlText = firstBlock.text.slice("---\n".length, end);

0 commit comments

Comments
 (0)