Skip to content

Commit

Permalink
fix: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe committed Dec 27, 2024
1 parent b035d63 commit f87db41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hooks/use-clipboard/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ export function useClipboard({timeout = 2000}: UseClipboardProps = {}) {
const copy = useCallback(
(valueToCopy: any) => {
if ("clipboard" in navigator) {
const decodedValue =
const transformedValue =
typeof valueToCopy === "string" ? transformWhitespace(valueToCopy) : valueToCopy;

navigator.clipboard
.writeText(decodedValue)
.writeText(transformedValue)
.then(() => handleCopyResult(true))
.catch((err) => setError(err));
} else {
Expand Down

0 comments on commit f87db41

Please sign in to comment.