Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Jan 23, 2025
1 parent 1115bee commit 8566968
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fdr-sdk/src/navigation/utils/getFrontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
export function getFrontmatter(markdown: string): string | undefined {
const frontmatterMatch = /^---\s*([\s\S]*?)\s*---/.exec(markdown.trimStart());
if (!frontmatterMatch || frontmatterMatch[1] == null) {
if (frontmatterMatch?.[1] == null) {
return undefined;
}
return frontmatterMatch[1];
Expand Down

0 comments on commit 8566968

Please sign in to comment.