Fix broken build

pull/1971/head
Kamran Ahmed 3 years ago
parent 30e6c15ddb
commit 8255f69257
  1. 2
      components/md-renderer/mdx-components/heading.tsx

@ -5,7 +5,7 @@ import LinkIcon from 'components/icons/link.svg';
const linkify = (Component: React.FunctionComponent<any>) => { const linkify = (Component: React.FunctionComponent<any>) => {
return function EnrichedHeading(props: { children: string }): React.ReactNode { return function EnrichedHeading(props: { children: string }): React.ReactNode {
const text = props.children; const text = props.children;
const id = text.toLowerCase && text const id = text?.toLowerCase && text
.toLowerCase() .toLowerCase()
.replace(/[^\x00-\x7F]/g, '') .replace(/[^\x00-\x7F]/g, '')
.replace(/\s+/g, '-') .replace(/\s+/g, '-')

Loading…
Cancel
Save