We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f1c59d commit aa55e03Copy full SHA for aa55e03
.changes/tauri-window-origin-default-to-null.md
@@ -0,0 +1,5 @@
1
+---
2
+'tauri': 'patch:bug'
3
4
+
5
+Set default window origin to `null`. Prevent window crash when loading `about:blank`.
core/tauri/src/manager/webview.rs
@@ -253,16 +253,18 @@ impl<R: Runtime> WebviewManager<R> {
253
&& window_url.scheme() != "https"
254
{
255
format!("http://{}.localhost", window_url.scheme())
256
- } else {
+ } else if let Some(host) = window_url.host() {
257
format!(
258
"{}://{}{}",
259
window_url.scheme(),
260
- window_url.host().unwrap(),
+ host,
261
window_url
262
.port()
263
.map(|p| format!(":{p}"))
264
.unwrap_or_default()
265
)
266
+ } else {
267
+ "null".into()
268
};
269
270
if !registered_scheme_protocols.contains(&"tauri".into()) {
0 commit comments