From 2771503b6f3b3754e04ac869c4a657566f4a5d0b Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Thu, 2 Oct 2025 18:30:58 +0800 Subject: [PATCH] fix: typo --- client/ui/copyToClipboard.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ui/copyToClipboard.ts b/client/ui/copyToClipboard.ts index 98e65ba..759e123 100644 --- a/client/ui/copyToClipboard.ts +++ b/client/ui/copyToClipboard.ts @@ -1,7 +1,7 @@ export default function copyToClipboard(text: string) { if (navigator.clipboard) return navigator.clipboard.writeText(text) - return new Promise((res rej) => { + return new Promise((res, rej) => { if (document.hasFocus()) { const a = document.createElement("textarea") document.body.appendChild(a) @@ -12,7 +12,7 @@ export default function copyToClipboard(text: string) { a.select() document.execCommand("copy", true) document.body.removeChild(a) - res() + res(null) } else { rej() }