From c9e0ba9f988c3f1beb415f8a34616d17f7258209 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sun, 5 Dec 2021 02:04:20 +0100 Subject: [PATCH] Fix broken build --- components/md-renderer/mdx-components/heading.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/md-renderer/mdx-components/heading.tsx b/components/md-renderer/mdx-components/heading.tsx index 53e25bfcc..1bda10f03 100644 --- a/components/md-renderer/mdx-components/heading.tsx +++ b/components/md-renderer/mdx-components/heading.tsx @@ -5,7 +5,7 @@ import LinkIcon from 'components/icons/link.svg'; const linkify = (Component: React.FunctionComponent) => { return function EnrichedHeading(props: { children: string }): React.ReactNode { const text = props.children; - const id = text.toLowerCase && text + const id = text?.toLowerCase && text .toLowerCase() .replace(/[^\x00-\x7F]/g, '') .replace(/\s+/g, '-')