浏览代码

Merge pull request #33036 from Faless/js/no_ecma6

Remove ECMAScript 6 "arrow operator".
Rémi Verschelde 6 年之前
父节点
当前提交
ea901b263c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform/javascript/os_javascript.cpp

+ 1 - 1
platform/javascript/os_javascript.cpp

@@ -837,7 +837,7 @@ void OS_JavaScript::set_clipboard(const String &p_text) {
 		var text = UTF8ToString($0);
 		var text = UTF8ToString($0);
 		if (!navigator.clipboard || !navigator.clipboard.writeText)
 		if (!navigator.clipboard || !navigator.clipboard.writeText)
 			return 1;
 			return 1;
-		navigator.clipboard.writeText(text).catch(e => {
+		navigator.clipboard.writeText(text).catch(function(e) {
 			// Setting OS clipboard is only possible from an input callback.
 			// Setting OS clipboard is only possible from an input callback.
 			console.error("Setting OS clipboard is only possible from an input callback for the HTML5 plafrom. Exception:", e);
 			console.error("Setting OS clipboard is only possible from an input callback for the HTML5 plafrom. Exception:", e);
 		});
 		});