fix clipboard.read error on Firefox (#729)
See more @ https://stackoverflow.com/questions/67440036/navigator-clipboard-readtext-is-not-working-in-js/67442777#67442777
This commit is contained in:
parent
0a52b5c317
commit
7c0e098b12
1 changed files with 1 additions and 1 deletions
|
@ -1881,7 +1881,7 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
|||
})
|
||||
|
||||
if (navigator.clipboard) {
|
||||
const items = await navigator.clipboard.read()
|
||||
const items = 'read' in navigator.clipboard ? await navigator.clipboard.read() : []
|
||||
|
||||
if (items.length === 0) return
|
||||
|
||||
|
|
Loading…
Reference in a new issue