diff --git a/src/components/Markdown.tsx b/src/components/Markdown.tsx index 94ad3276..044366c0 100644 --- a/src/components/Markdown.tsx +++ b/src/components/Markdown.tsx @@ -78,9 +78,9 @@ export default (props: Props) => { const parser = new DOMParser() const doc = parser.parseFromString(match, 'text/html') const codeElement = doc.querySelector('code') - const code = codeElement ? codeElement.textContent : '' + const code = codeElement?.textContent || '' - const result = `