fix: don't propogate empty edits

This commit is contained in:
Jonathan Kelley 2022-03-04 13:13:50 -05:00
parent 0e09dda1be
commit e5b034c6a4

View file

@ -488,11 +488,14 @@ impl VirtualDom {
let DiffState { mutations, .. } = diff_state; let DiffState { mutations, .. } = diff_state;
log::trace!("succesffuly resolved scopes {:?}", mutations.dirty_scopes); log::trace!("succesffuly resolved scopes {:?}", mutations.dirty_scopes);
for scope in &mutations.dirty_scopes { for scope in &mutations.dirty_scopes {
self.dirty_scopes.remove(scope); self.dirty_scopes.remove(scope);
} }
committed_mutations.push(mutations); if !mutations.edits.is_empty() {
committed_mutations.push(mutations);
}
// todo: pause the diff machine // todo: pause the diff machine
// if diff_state.work(&mut deadline) { // if diff_state.work(&mut deadline) {