Skip to content

Commit f65d792

Browse files
committed
fix: copyClipboard
1 parent 6e7d511 commit f65d792

File tree

2 files changed

+67
-54
lines changed

2 files changed

+67
-54
lines changed

package-lock.json

Lines changed: 66 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/CopyToClipboard/copyText.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function copyText(text: string) {
22
if (typeof navigator !== 'undefined' && navigator.clipboard?.writeText) {
33
try {
4-
return navigator.clipboard.writeText(text);
4+
navigator.clipboard.writeText(text);
55
} catch (error) {
66
return typeof document === 'undefined' ? Promise.reject(error) : copyTextFallback(text);
77
}

0 commit comments

Comments
 (0)