Prechádzať zdrojové kódy

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

Lucas Fernandes Nogueira 1 rok pred
rodič
commit
35b25f7e5c

+ 6 - 0
.changes/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.

+ 4 - 0
core/tauri/permissions/webview/autogenerated/reference.md

@@ -20,8 +20,12 @@
 |`deny-set-webview-zoom`|Denies the set_webview_zoom command without any pre-configured scope.|
 |`allow-webview-close`|Enables the webview_close command without any pre-configured scope.|
 |`deny-webview-close`|Denies the webview_close command without any pre-configured scope.|
+|`allow-webview-hide`|Enables the webview_hide command without any pre-configured scope.|
+|`deny-webview-hide`|Denies the webview_hide command without any pre-configured scope.|
 |`allow-webview-position`|Enables the webview_position command without any pre-configured scope.|
 |`deny-webview-position`|Denies the webview_position command without any pre-configured scope.|
+|`allow-webview-show`|Enables the webview_show command without any pre-configured scope.|
+|`deny-webview-show`|Denies the webview_show command without any pre-configured scope.|
 |`allow-webview-size`|Enables the webview_size command without any pre-configured scope.|
 |`deny-webview-size`|Denies the webview_size command without any pre-configured scope.|
 |`default`|Default permissions for the plugin.|

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
core/tauri/scripts/bundle.global.js


+ 1 - 1
core/tauri/scripts/ipc-protocol.js

@@ -29,7 +29,7 @@
           'Content-Type': contentType,
           'Tauri-Callback': callback,
           'Tauri-Error': error,
-          ...options?.headers
+          ...((options && options.headers) || {})
         }
       })
         .then((response) => {

+ 1 - 1
tooling/api/tsconfig.json

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

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov