mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix: handle nested data in serde_qs deserialization correctly (#1183)
This commit is contained in:
parent
d15ba11104
commit
601db7aa86
2 changed files with 3 additions and 2 deletions
|
@ -692,6 +692,6 @@ where
|
|||
web_sys::UrlSearchParams::new_with_str_sequence_sequence(form_data)
|
||||
.unwrap_throw();
|
||||
let data = data.to_string().as_string().unwrap_or_default();
|
||||
serde_qs::from_str::<Self>(&data)
|
||||
serde_qs::Config::new(5, false).deserialize_str::<Self>(&data)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -375,7 +375,8 @@ where
|
|||
// decode the args
|
||||
let value = match Self::encoding() {
|
||||
Encoding::Url | Encoding::GetJSON | Encoding::GetCBOR => {
|
||||
serde_qs::from_bytes(data)
|
||||
serde_qs::Config::new(5, false)
|
||||
.deserialize_bytes(data)
|
||||
.map_err(|e| ServerFnError::Deserialization(e.to_string()))
|
||||
}
|
||||
Encoding::Cbor => ciborium::de::from_reader(data)
|
||||
|
|
Loading…
Reference in a new issue