From e5b034c6a42a2b6a9f7c154363686ca038a156b2 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Fri, 4 Mar 2022 13:13:50 -0500 Subject: [PATCH] fix: don't propogate empty edits --- packages/core/src/virtual_dom.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/virtual_dom.rs b/packages/core/src/virtual_dom.rs index 8e5e4814f..8d3fd1789 100644 --- a/packages/core/src/virtual_dom.rs +++ b/packages/core/src/virtual_dom.rs @@ -488,11 +488,14 @@ impl VirtualDom { let DiffState { mutations, .. } = diff_state; log::trace!("succesffuly resolved scopes {:?}", mutations.dirty_scopes); + for scope in &mutations.dirty_scopes { self.dirty_scopes.remove(scope); } - committed_mutations.push(mutations); + if !mutations.edits.is_empty() { + committed_mutations.push(mutations); + } // todo: pause the diff machine // if diff_state.work(&mut deadline) {