Skip to content

Commit 35b25f7

Browse files
authored
fix: optional chaining is not supported on older webviews (#9530)
1 parent 70c5137 commit 35b25f7

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

.changes/script-older-os.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@tauri-apps/api": patch:bug
3+
"tauri": patch:bug
4+
---
5+
6+
Do not use JS optional chaining to prevent script errors on older webviews such as macOS 10.14.

core/tauri/permissions/webview/autogenerated/reference.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@
2020
|`deny-set-webview-zoom`|Denies the set_webview_zoom command without any pre-configured scope.|
2121
|`allow-webview-close`|Enables the webview_close command without any pre-configured scope.|
2222
|`deny-webview-close`|Denies the webview_close command without any pre-configured scope.|
23+
|`allow-webview-hide`|Enables the webview_hide command without any pre-configured scope.|
24+
|`deny-webview-hide`|Denies the webview_hide command without any pre-configured scope.|
2325
|`allow-webview-position`|Enables the webview_position command without any pre-configured scope.|
2426
|`deny-webview-position`|Denies the webview_position command without any pre-configured scope.|
27+
|`allow-webview-show`|Enables the webview_show command without any pre-configured scope.|
28+
|`deny-webview-show`|Denies the webview_show command without any pre-configured scope.|
2529
|`allow-webview-size`|Enables the webview_size command without any pre-configured scope.|
2630
|`deny-webview-size`|Denies the webview_size command without any pre-configured scope.|
2731
|`default`|Default permissions for the plugin.|

core/tauri/scripts/bundle.global.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/tauri/scripts/ipc-protocol.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
'Content-Type': contentType,
3030
'Tauri-Callback': callback,
3131
'Tauri-Error': error,
32-
...options?.headers
32+
...((options && options.headers) || {})
3333
}
3434
})
3535
.then((response) => {

tooling/api/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2021",
3+
"target": "es2019",
44
"module": "esnext",
55
"moduleResolution": "bundler",
66
"skipLibCheck": true,

0 commit comments

Comments
 (0)