Fixed rsx emit with new AccessCell
This commit is contained in:
+5
-3
@@ -76,13 +76,15 @@ fn emit_node_scope(node: &RsxNode) -> TokenStream {
|
|||||||
{
|
{
|
||||||
#deps_emit
|
#deps_emit
|
||||||
r.dynamic_scope(move |scope| {
|
r.dynamic_scope(move |scope| {
|
||||||
|
scope.access_children(|children| {
|
||||||
if #cond {
|
if #cond {
|
||||||
if scope.children.lock().unwrap().is_empty() {
|
if children.is_empty() {
|
||||||
#(#kids)*
|
#(#kids)*
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
scope.children.lock().unwrap().clear();
|
.children.clear();
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}, #deps_vec_emit);
|
}, #deps_vec_emit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,7 +105,7 @@ fn emit_node_scope(node: &RsxNode) -> TokenStream {
|
|||||||
#deps_emit
|
#deps_emit
|
||||||
#[allow(unused_parens)]
|
#[allow(unused_parens)]
|
||||||
r.dynamic_scope(move |scope| {
|
r.dynamic_scope(move |scope| {
|
||||||
scope.children.lock().unwrap().clear();
|
scope.access_children(|children| children.clear());
|
||||||
for #pat in #expr {
|
for #pat in #expr {
|
||||||
#(#kids)*
|
#(#kids)*
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user