Skip to content

Commit 11fb26d

Browse files
authored
fix: replace private field access with public method (tauri-apps#2770)
1 parent ec853c5 commit 11fb26d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/develop/_sections/frontend-listen.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Global and webview-specific events are also delivered to listeners registered in
8484
tauri::Builder::default()
8585
.setup(|app| {
8686
app.listen("download-started", |event| {
87-
if let Ok(payload) = serde_json::from_str::<DownloadStarted>(&event.data) {
87+
if let Ok(payload) = serde_json::from_str::<DownloadStarted>(&event.payload()) {
8888
println!("downloading {}", payload.url);
8989
}
9090
});

0 commit comments

Comments
 (0)