mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-12 23:57:09 +00:00
Resolves issue #97
This commit is contained in:
parent
9f1b27ad26
commit
d0c6319a72
1 changed files with 5 additions and 2 deletions
|
@ -302,7 +302,7 @@ fn insert_expression(
|
|||
Child::Nodes(new_nodes.to_vec())
|
||||
}
|
||||
} else {
|
||||
clean_children(&parent, Child::Null, before, None);
|
||||
clean_children(&parent, current, before, None);
|
||||
append_nodes(parent, new_nodes.to_vec(), before.as_some_node().cloned());
|
||||
Child::Nodes(new_nodes.to_vec())
|
||||
}
|
||||
|
@ -427,7 +427,10 @@ fn clean_children(
|
|||
match current {
|
||||
Child::Null => Child::Node(insert_before(parent, &node, marker.as_some_node())),
|
||||
Child::Text(_) => Child::Node(insert_before(parent, &node, marker.as_some_node())),
|
||||
Child::Node(_) => Child::Node(insert_before(parent, &node, marker.as_some_node())),
|
||||
Child::Node(current) => {
|
||||
replace_child(parent, &node, ¤t);
|
||||
Child::Node(node)
|
||||
}
|
||||
Child::Nodes(nodes) => {
|
||||
if nodes.is_empty() {
|
||||
Child::Node(insert_before(parent, &node, marker.as_some_node()))
|
||||
|
|
Loading…
Reference in a new issue