fix: `#[server]` macro error type detection (#2298)
In most cases when you return `Result<..., ServerFnError<E>>` this worked but when you tried `Result<..., leptos::ServerFnError<E>>` then it didn't.
This commit is contained in:
parent
830fba794e
commit
23bc892a24
|
@ -638,7 +638,7 @@ fn err_type(return_ty: &Type) -> Result<Option<&GenericArgument>> {
|
|||
{
|
||||
if let Some(segment) = pat.path.segments.last() {
|
||||
if segment.ident == "ServerFnError" {
|
||||
let args = &pat.path.segments[0].arguments;
|
||||
let args = &segment.arguments;
|
||||
match args {
|
||||
// Result<T, ServerFnError>
|
||||
PathArguments::None => return Ok(None),
|
||||
|
|
Loading…
Reference in New Issue