polish the throw trait

This commit is contained in:
Evan Almloff committed 2023-11-07 18:24:07 -06:00
1 parent c18f911429
commit 6141aeb037
8 files changed
+374 -119

No files matched your search

+1 -1
View File
@@ -560,7 +560,7 @@ impl<'b> VirtualDom {
// If none of the old keys are reused by the new children, then we remove all the remaining old children and
// create the new children afresh.
if shared_keys.is_empty() {
if old.get(0).is_some() {
if !old.is_empty() {
self.remove_nodes(&old[1..]);
self.replace(&old[0], new);
} else {