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

This commit is contained in:
Lucas Fernandes Nogueira 2024-04-22 10:27:45 -03:00 committed by GitHub
parent 70c51371e0
commit 35b25f7e5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 3 deletions

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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