prefect-ui-library icon indicating copy to clipboard operation
prefect-ui-library copied to clipboard

prefect 2.14.6 `Copied to clipboard` raise error `TypeError: Cannot read properties of undefined (reading 'writeText')`

Open Ox0400 opened this issue 1 year ago • 2 comments

prefect 2.14.6 Copied to clipboard raise error TypeError: Cannot read properties of undefined (reading 'writeText')

index-ede2aed2.js:1 TypeError: Cannot read properties of undefined (reading 'writeText')
    at MO (index-ede2aed2.js:67:39515)
    at j.onClick.i.<computed>.i.<computed> (index-ede2aed2.js:113:22432)
    at db (index-ede2aed2.js:1:14649)
    at tu (index-ede2aed2.js:1:14728)
    at HTMLButtonElement.i (index-ede2aed2.js:1:70379)

Source code.

function MO(e, t="Copied to clipboard!") {
    navigator.clipboard.writeText(e),
    je(t, "success")
}

Ox0400 avatar Nov 23 '23 06:11 Ox0400