diff --git a/src/components/Content.js b/src/components/Content.js index 8204e66..601e8b7 100644 --- a/src/components/Content.js +++ b/src/components/Content.js @@ -4,7 +4,7 @@ import Marked from 'react-markdown' import { getImageSrc, getImageSrcset } from '../util/getImageUrl' import './Content.css' -const encodeMarkdownURIs = source => { +const encodeMarkdownURIs = (source = '') => { const markdownLinkRegex = /\[(?:\[[^\]]*\]|[^[\]])*\]\([ \t]*?[ \t]*(['"].*?\6[ \t]*)?\)/g return source.replace(markdownLinkRegex, (match, linkURI) => { if (!linkURI) return match