Use the correct to-static impl for sending escaped strings via hotreload (#2753)
This commit is contained in:
1 parent
828cc502f1
commit
189772a17b
3 files changed
+16
-16
No files matched your search
@@ -66,13 +66,11 @@ impl TextNode {
|
||||
#[cfg(feature = "hot_reload")]
|
||||
pub fn to_template_node(&self) -> TemplateNode {
|
||||
use crate::intern;
|
||||
match self.is_static() {
|
||||
true => {
|
||||
let text = self.input.source.clone();
|
||||
let text = intern(text.value().as_str());
|
||||
TemplateNode::Text { text }
|
||||
}
|
||||
false => TemplateNode::Dynamic {
|
||||
match self.input.to_static() {
|
||||
Some(text) => TemplateNode::Text {
|
||||
text: intern(text.as_str()),
|
||||
},
|
||||
None => TemplateNode::Dynamic {
|
||||
id: self.dyn_idx.get(),
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user