Skip to content

Commit 721ef1f

Browse files
authored
[BugFix][web] Fixed an error when using the copy button in the Resource Center (#3980)
1 parent bdec795 commit 721ef1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dinky-web/src/utils/function.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ export const parseDateStringToDate = (dateString: Date) => {
649649
*/
650650
export async function handleCopyToClipboard(copyText: string) {
651651
// Adapting to browsers without the navigator.clipboard.writeText method can be done using the following code
652-
if (!navigator) {
652+
if (!navigator?.clipboard) {
653653
const textarea = document.createElement('textarea');
654654
textarea.value = copyText;
655655
document.body.appendChild(textarea);

0 commit comments

Comments
 (0)