Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/script-older-os.md
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 0 deletions core/tauri/permissions/webview/autogenerated/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.|
2 changes: 1 addition & 1 deletion core/tauri/scripts/bundle.global.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/tauri/scripts/ipc-protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'Content-Type': contentType,
'Tauri-Callback': callback,
'Tauri-Error': error,
...options?.headers
...((options && options.headers) || {})
}
})
.then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2021",
"target": "es2019",
"module": "esnext",
"moduleResolution": "bundler",
"skipLibCheck": true,
Expand Down
Loading