We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a4842c commit 2959881Copy full SHA for 2959881
scopes/mdx/mdx/mdx.doc-reader.ts
@@ -8,7 +8,7 @@ export class MDXDocReader implements DocReader {
8
9
async read(path: string, contents: Buffer) {
10
const output = compileSync(contents.toString('utf-8'), mdxOptions);
11
- const metadata = output.data.frontmatter as any;
+ const metadata = output.data?.frontmatter ?? {};
12
13
const doc = Doc.from(path, metadata);
14
return doc;
0 commit comments