don't push template nodes onto the stack

This commit is contained in:
Evan Almloff committed 2022-12-05 13:49:55 -06:00
1 parent 1587056a4b
commit 24cb503c09
1 file changed
-4
-4
View File
@@ -138,26 +138,22 @@ impl<S: State> RealDom<S> {
let child_id = self.create_template_node(child, mutations_vec);
self.add_child(node_id, child_id);
}
self.stack.push(node_id);
node_id
}
TemplateNode::Text(txt) => {
let node_id = self.create_node(Node::new(NodeType::Text {
text: txt.to_string(),
}));
self.stack.push(node_id);
node_id
}
TemplateNode::Dynamic(_) => {
let node_id = self.create_node(Node::new(NodeType::Placeholder));
self.stack.push(node_id);
node_id
}
TemplateNode::DynamicText(_) => {
let node_id = self.create_node(Node::new(NodeType::Text {
text: String::new(),
}));
self.stack.push(node_id);
node_id
}
}