mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-14 00:27:12 +00:00
parent
8670365594
commit
d1248d3faf
1 changed files with 1 additions and 7 deletions
|
@ -505,13 +505,7 @@ where
|
||||||
key: &str,
|
key: &str,
|
||||||
el: &R::Element,
|
el: &R::Element,
|
||||||
) -> Self::State {
|
) -> Self::State {
|
||||||
// if we're actually hydrating from SSRed HTML, we don't need to set the attribute
|
let state = self.map(|v| v.hydrate::<FROM_SERVER>(key, el));
|
||||||
// if we're hydrating from a CSR-cloned <template>, we do need to set non-StaticAttr attributes
|
|
||||||
let state = if !FROM_SERVER {
|
|
||||||
self.map(|v| v.hydrate::<FROM_SERVER>(key, el))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
(el.clone(), state)
|
(el.clone(), state)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue