mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
potential fix for #26
This commit is contained in:
parent
6ba4d94a04
commit
2337de90a1
@ -239,7 +239,7 @@
|
|||||||
|
|
||||||
@Watch('clipboard')
|
@Watch('clipboard')
|
||||||
onClipboardChanged(clipboard: string) {
|
onClipboardChanged(clipboard: string) {
|
||||||
if (navigator.clipboard) {
|
if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {
|
||||||
navigator.clipboard.writeText(clipboard).catch(console.error)
|
navigator.clipboard.writeText(clipboard).catch(console.error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -329,7 +329,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hosting && navigator.clipboard) {
|
if (this.hosting && navigator.clipboard && typeof navigator.clipboard.readText === 'function') {
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
.readText()
|
.readText()
|
||||||
.then(text => {
|
.then(text => {
|
||||||
|
Loading…
Reference in New Issue
Block a user