Fix hot reload custom element (#2866)
* Fix hot reloading attributes on web components
This commit is contained in:
1 parent
3c699aad26
commit
6a46a66c9a
1 file changed
+3
-1
@@ -174,7 +174,9 @@ impl Attribute {
|
|||||||
let element_name = self.el_name.as_ref().unwrap();
|
let element_name = self.el_name.as_ref().unwrap();
|
||||||
let rust_name = match element_name {
|
let rust_name = match element_name {
|
||||||
ElementName::Ident(i) => i.to_string(),
|
ElementName::Ident(i) => i.to_string(),
|
||||||
ElementName::Custom(s) => return (intern(s.value()), None),
|
// If this is a web component, just use the name of the elements instead of mapping the attribute
|
||||||
|
// through the hot reloading context
|
||||||
|
ElementName::Custom(_) => return (intern(attribute_name_rust.as_str()), None),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ctx::map_attribute(&rust_name, &attribute_name_rust)
|
Ctx::map_attribute(&rust_name, &attribute_name_rust)
|
||||||
|
|||||||
Reference in new issue
Block a user