From 5a00d0a32f4d5a44144b0fe0136d8113cb10c090 Mon Sep 17 00:00:00 2001 From: morning-star Date: Sun, 3 Sep 2023 08:20:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20lay.clipboard.writeText=20?= =?UTF-8?q?IE8=20=E4=B8=8B=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 lay.clipboard.writeText IE8 下报错的问题,catch 是保留字 --- src/modules/lay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/lay.js b/src/modules/lay.js index 99963200..a42e59ce 100644 --- a/src/modules/lay.js +++ b/src/modules/lay.js @@ -318,7 +318,7 @@ try { navigator.clipboard.writeText(text).then( options.done - ).catch(options.error); + ).['catch'](options.error); } catch(e) { var elem = document.createElement('textarea');