mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-02 07:56:20 +03:00
fix double serialize on invoke (#5639)
Co-authored-by: LucasJavaudin <lucas.javaudin@cyu.fr> Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
parent
168c3d0148
commit
677838ccfa
5
.changes/fix-invoke-double-serialize.md
Normal file
5
.changes/fix-invoke-double-serialize.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes a double serialization on the IPC.
|
@ -193,7 +193,11 @@ impl<R: Runtime> InvokeResolver<R> {
|
||||
F: Future<Output = Result<JsonValue, InvokeError>> + Send + 'static,
|
||||
{
|
||||
crate::async_runtime::spawn(async move {
|
||||
Self::return_result(self.window, task.await.into(), self.callback, self.error)
|
||||
let response = match task.await {
|
||||
Ok(ok) => InvokeResponse::Ok(ok),
|
||||
Err(err) => InvokeResponse::Err(err),
|
||||
};
|
||||
Self::return_result(self.window, response, self.callback, self.error)
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user