Skip to content

Commit 23132ac

Browse files
authored
fix(tauri): run plugin::ready without webview.dispatch (#1164)
* fix(tauri): run plugin::ready without webview.dispatch * chore: add change file
1 parent f1afb5c commit 23132ac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.changes/plugin-ready-hook.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": "patch"
3+
---
4+
5+
Fixes the event system usage on the plugin `ready` hook.

tauri/src/app/runner.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,7 @@ fn build_webview(
312312
};
313313
application.run_setup(&mut w, source.to_string());
314314
if source == "window-1" {
315-
w.dispatch(|w| {
316-
crate::plugin::ready(w);
317-
});
315+
crate::plugin::ready(&mut w);
318316
}
319317
} else if arg == r#"{"cmd":"closeSplashscreen"}"# {
320318
let content_href = match content_clone {

0 commit comments

Comments
 (0)