Fix broken build

This commit is contained in:
Kamran Ahmed
2021-12-05 02:04:20 +01:00
parent 30e6c15ddb
commit 8255f69257

View File

@ -5,7 +5,7 @@ import LinkIcon from 'components/icons/link.svg';
const linkify = (Component: React.FunctionComponent<any>) => {
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, '-')