Skip to content

Commit

Permalink
fix empty #[builder()] in slots
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj committed Aug 26, 2023
1 parent b3e5736 commit f3865b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion leptos_macro/src/slot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ impl ToTokens for TypedBuilderOpts {
quote! {}
};

let output = quote! { #[builder(#default #setter)] };
let output = if !default.is_empty() || !setter.is_empty() {
quote! { #[builder(#default #setter)] }
} else {
quote! {}
};

tokens.append_all(output);
}
Expand Down

0 comments on commit f3865b5

Please sign in to comment.