Fixed check if navigator.clipboard.writeText is defined

This commit is contained in:
akamos 2019-10-04 14:27:16 +02:00
parent bec4cba887
commit a6014cd4cd
1 changed files with 1 additions and 1 deletions

View File

@ -916,7 +916,7 @@ const UI = {
* ------v------*/
writeLocalClipboard(text) {
if (typeof navigator.clipboard !== "undefined" && typeof navigator.clipboard.readText !== "undefined") {
if (typeof navigator.clipboard !== "undefined" && typeof navigator.clipboard.writeText !== "undefined") {
navigator.clipboard.writeText(text).then(() => {
let debugMessage = text.substr(0, 40) + "...";
Log.Debug('>> UI.setClipboardText: navigator.clipboard.writeText with ' + debugMessage);