Skip to content

Commit

Permalink
Fix crash in replace_node_with
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Oct 4, 2024
1 parent 0ffe3a5 commit eaccdd5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/dioxus-blitz/src/documents/dioxus_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,9 @@ impl WriteMutations for MutationWriter<'_> {

let new_nodes = self.state.stack.split_off(self.state.stack.len() - m);
let anchor_node_id = self.state.element_to_node_id(id);
self.maybe_push_parent_style_node(anchor_node_id);
self.doc.insert_before(anchor_node_id, &new_nodes);
self.doc.remove_node(anchor_node_id);

self.maybe_push_parent_style_node(anchor_node_id);
}

fn replace_placeholder_with_nodes(&mut self, path: &'static [u8], m: usize) {
Expand Down

0 comments on commit eaccdd5

Please sign in to comment.