mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 23:19:09 +00:00
fix: prevent clipboard error in secure context (#462)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// we need to this as a promise because safari
|
// we need to this as a promise because safari
|
||||||
export default async function copyToClipboard(text: string) {
|
export default async function copyToClipboard(text: string) {
|
||||||
setTimeout(async () => await navigator.clipboard.writeText(text));
|
setTimeout(async () => await navigator.clipboard?.writeText(text));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user