Skip to content

Commit

Permalink
[BugFix][web] Fixed an error when using the copy button in the Resour…
Browse files Browse the repository at this point in the history
…ce Center (#3980)
  • Loading branch information
zackyoungh authored Nov 28, 2024
1 parent bdec795 commit 721ef1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dinky-web/src/utils/function.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ export const parseDateStringToDate = (dateString: Date) => {
*/
export async function handleCopyToClipboard(copyText: string) {
// Adapting to browsers without the navigator.clipboard.writeText method can be done using the following code
if (!navigator) {
if (!navigator?.clipboard) {
const textarea = document.createElement('textarea');
textarea.value = copyText;
document.body.appendChild(textarea);
Expand Down

0 comments on commit 721ef1f

Please sign in to comment.