diff --git a/crates/tauri-runtime-wry/src/lib.rs b/crates/tauri-runtime-wry/src/lib.rs index b2a66248b..a69a389a5 100644 --- a/crates/tauri-runtime-wry/src/lib.rs +++ b/crates/tauri-runtime-wry/src/lib.rs @@ -4580,7 +4580,6 @@ You may have it installed on another user account, but it is not available for t let web_context = match entry { Occupied(occupied) => { let occupied = occupied.into_mut(); - occupied.referenced_by_webviews.insert(label.clone()); #[cfg(windows)] if cfg!(debug_assertions) && occupied.environment_options != environment_options { @@ -4592,6 +4591,8 @@ You may have it installed on another user account, but it is not available for t eprintln!("{message}"); } + occupied.referenced_by_webviews.insert(label.clone()); + occupied } Vacant(vacant) => {