Fix leak in render macro

This commit is contained in:
Jonathan Kelley committed 2024-01-08 19:20:31 -08:00
1 parent 0a35b5a670
commit 44a27bf8a3
9 files changed
+197 -114

No files matched your search

+8 -9
View File
@@ -28,15 +28,14 @@ use crate::innerlude::*;
#[allow(non_upper_case_globals, non_snake_case)]
pub fn Fragment<'a>(cx: Scope<'a, FragmentProps<'a>>) -> Element {
let children = cx.props.0.as_ref()?;
Some(VNode {
key: children.key,
parent: children.parent.clone(),
stable_id: children.stable_id.clone(),
template: children.template.clone(),
root_ids: children.root_ids.clone(),
dynamic_nodes: children.dynamic_nodes,
dynamic_attrs: children.dynamic_attrs,
})
Some(cx.vnode(
children.parent.clone(),
children.key,
children.template.clone(),
children.root_ids.clone(),
children.dynamic_nodes,
children.dynamic_attrs,
))
}
pub struct FragmentProps<'a>(Element<'a>);