Skip to content

Commit

Permalink
fix fuck up
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Feb 22, 2022
1 parent 8be6eec commit 832cfba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/yew-macro/src/props/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl ComponentProps {
let mut set_props = vec![];
let mut global_props = vec![];
for Prop { label, value, .. } in self.props.iter() {
if shared.contains(&label.to_string()) {
if is_element && shared.contains(&label.to_string()) {
global_props.push(quote_spanned! {value.span()=>
.#label(#value)
})
Expand All @@ -137,9 +137,9 @@ impl ComponentProps {

quote_spanned! {props_ty.span()=>
<#props_ty as ::yew::html::Properties>::builder()
#globals_setter
#(#set_props)*
#set_children
#globals_setter
.build()
}
}
Expand Down

0 comments on commit 832cfba

Please sign in to comment.