fix hydration

This commit is contained in:
Evan Almloff committed 2023-09-27 10:22:49 -05:00
1 parent 3e55bb8885
commit c137357094
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -128,7 +128,7 @@ impl ScopeContext {
parent.name parent.name
); );
if let Some(shared) = parent.shared_contexts.borrow().iter().find_map(|any| { if let Some(shared) = parent.shared_contexts.borrow().iter().find_map(|any| {
tracing::trace!("found context {:?}", any.type_id()); tracing::trace!("found context {:?}", (**any).type_id());
any.downcast_ref::<T>() any.downcast_ref::<T>()
}) { }) {
return Some(shared.clone()); return Some(shared.clone());
+2
View File
@@ -128,6 +128,7 @@ impl WebsysDom {
for attr in *attrs { for attr in *attrs {
if let dioxus_core::TemplateAttribute::Dynamic { id } = attr { if let dioxus_core::TemplateAttribute::Dynamic { id } = attr {
let attribute = &vnode.dynamic_attrs[*id]; let attribute = &vnode.dynamic_attrs[*id];
&attribute.attribute_type().for_each(|attribute| {
let value = &attribute.value; let value = &attribute.value;
let id = attribute.mounted_element(); let id = attribute.mounted_element();
mounted_id = Some(id); mounted_id = Some(id);
@@ -140,6 +141,7 @@ impl WebsysDom {
event_bubbles(event_name) as u8, event_bubbles(event_name) as u8,
); );
} }
});
} }
} }
if let Some(id) = mounted_id { if let Some(id) = mounted_id {