Skip to content

Commit

Permalink
fix(utils): clipboardFallbackTextCopy try catch문 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ssi02014 committed May 14, 2024
1 parent c1b17d2 commit f4eb1d8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export const clipboardFallbackTextCopy = (value: string) => {
textArea.focus();
textArea.select();

document.execCommand('copy');
try {
document.execCommand('copy');
} catch (err: any) {
console.error(`Copying to the clipboard failed. message: ${err.message}`);
}
document.body.removeChild(textArea);
};

0 comments on commit f4eb1d8

Please sign in to comment.