Explorar o código

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

Lucas Fernandes Nogueira hai 1 ano
pai
achega
705da977a9

+ 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.

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 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,

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio