From 694cd9bbe9f366d011a99c30fc7237f834a0760c Mon Sep 17 00:00:00 2001 From: ddiu8081 Date: Thu, 14 Sep 2023 00:40:29 +0800 Subject: [PATCH] fix: ts error; remove attributify-mode class --- src/components/Markdown.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = `
+ const result = `
${copied()[index] === true ? '' : ''}