mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-02-23 17:59:49 +08:00
Merge pull request #5495 from ConnectAI-E/Fix-code-duplication
Fix code duplication
This commit is contained in:
commit
4c3fd55a75
@ -128,8 +128,9 @@ export function PreCode(props: { children: any }) {
|
||||
className="copy-code-button"
|
||||
onClick={() => {
|
||||
if (ref.current) {
|
||||
const code = ref.current.innerText;
|
||||
copyToClipboard(code);
|
||||
copyToClipboard(
|
||||
ref.current.querySelector("code")?.innerText ?? "",
|
||||
);
|
||||
}
|
||||
}}
|
||||
></span>
|
||||
|
Loading…
Reference in New Issue
Block a user