소스 검색

fix: optional chaining is not supported on older webviews (#9529)

Lucas Fernandes Nogueira 1 년 전
부모
커밋
705da977a9
4개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 0
      .changes/fix-script-older-os.md
  2. 0 0
      core/tauri/scripts/bundle.global.js
  3. 2 1
      core/tauri/scripts/core.js
  4. 1 1
      tooling/api/tsconfig.json

+ 6 - 0
.changes/fix-script-older-os.md

@@ -0,0 +1,6 @@
+---
+"@tauri-apps/api": patch:bug
+"tauri": patch:bug
+---
+
+Do not use JS optional chaining to prevent script errors on older webviews such as macOS 10.14.

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
core/tauri/scripts/bundle.global.js


+ 2 - 1
core/tauri/scripts/core.js

@@ -102,7 +102,8 @@
       'click',
       function (e) {
         let target = e.target
-        const baseTarget = document.querySelector('head base')?.target
+        const base = document.querySelector('head base')
+        const baseTarget = base ? base.target : null
         while (target != null) {
           if (target.matches('a')) {
             if (

+ 1 - 1
tooling/api/tsconfig.json

@@ -1,6 +1,6 @@
 {
   "compilerOptions": {
-    "target": "es2021",
+    "target": "es2019",
     "module": "esnext",
     "moduleResolution": "bundler",
     "skipLibCheck": true,

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.