mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-17 06:08:26 +00:00
undo >=1 check on roots
This commit is contained in:
parent
ae352f8958
commit
22e82fc140
1 changed files with 2 additions and 2 deletions
|
@ -179,8 +179,8 @@ impl<'a> ToTokens for TemplateRenderer<'a> {
|
|||
let mut context = DynamicContext::default();
|
||||
|
||||
let key = match self.roots.first() {
|
||||
Some(BodyNode::Element(el)) if self.roots.len() >= 1 => el.key.clone(),
|
||||
Some(BodyNode::Component(comp)) if self.roots.len() >= 1 => comp.key().cloned(),
|
||||
Some(BodyNode::Element(el)) if self.roots.len() == 1 => el.key.clone(),
|
||||
Some(BodyNode::Component(comp)) if self.roots.len() == 1 => comp.key().cloned(),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue