Skip to content

Commit 2959881

Browse files
GiladShohamCopilot
andauthored
Update mdx.doc-reader.ts
Co-authored-by: Copilot <[email protected]>
1 parent 1a4842c commit 2959881

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scopes/mdx/mdx/mdx.doc-reader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class MDXDocReader implements DocReader {
88

99
async read(path: string, contents: Buffer) {
1010
const output = compileSync(contents.toString('utf-8'), mdxOptions);
11-
const metadata = output.data.frontmatter as any;
11+
const metadata = output.data?.frontmatter ?? {};
1212

1313
const doc = Doc.from(path, metadata);
1414
return doc;

0 commit comments

Comments
 (0)