Skip to content

Commit

Permalink
fix: already borrowed error here
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanceras committed Mar 9, 2024
1 parent 632a287 commit 112a8ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/core/src/dom/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,9 @@ where
return Ok(());
}
let dom_patches: Vec<DomPatch> = self.pending_patches.borrow_mut().drain(..).collect();
if let Some(new_root_node) = self.apply_dom_patches(self.root_node.borrow().as_ref().expect("must have a root node"), dom_patches)?{
let new_root_node = self.apply_dom_patches(self.root_node.borrow().as_ref().expect("must have a root node"), dom_patches)?;

if let Some(new_root_node) = new_root_node{
*self.root_node.borrow_mut() = Some(new_root_node);
}
Ok(())
Expand Down

0 comments on commit 112a8ff

Please sign in to comment.