Skip to content

Commit

Permalink
fixed name mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jquesada2016 committed Dec 23, 2022
1 parent 8639410 commit ae506fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions leptos_macro/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl ToTokens for Model {
let mut body = body.to_owned();

body.sig.ident = format_ident!("__{}", body.sig.ident);
let body_name = body.sig.ident.clone();

let (_, generics, where_clause) = body.sig.generics.split_for_impl();

Expand All @@ -115,7 +116,7 @@ impl ToTokens for Model {

let component = if *is_transparent {
quote! {
#name(cx, #prop_names)
#body_name(cx, #prop_names)
}
} else {
quote! {
Expand All @@ -125,7 +126,7 @@ impl ToTokens for Model {
#[cfg(debug_assertions)]
let _guard = span.entered();

#name(cx, #prop_names)
#body_name(cx, #prop_names)
}
)
}
Expand Down

0 comments on commit ae506fc

Please sign in to comment.