mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
checking to make sure children is not empty before applying replace opt
This commit is contained in:
parent
04aa1585fa
commit
af067361a9
1 changed files with 1 additions and 1 deletions
|
@ -392,7 +392,7 @@ fn apply_cmds<T, EF, N>(
|
|||
let mut items_to_move = Vec::with_capacity(cmds.moving);
|
||||
|
||||
// We can optimize the case of replacing all items
|
||||
if cmds.removing == children.len() {
|
||||
if !children.is_empty() && cmds.removing == children.len() {
|
||||
children.clear();
|
||||
|
||||
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||
|
|
Loading…
Reference in a new issue