Skip to content

Commit

Permalink
more fixes hopefully good
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Sep 30, 2023
1 parent ea8b6a7 commit 56eb9c8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/yew/src/dom_bundle/bnode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,16 @@ mod feat_hydration {
fragment: &mut Fragment,
) -> Self::Bundle {
match self {
VNode::VTag(vtag) => vtag.hydrate(root, parent_scope, parent, fragment).into(),
VNode::VTag(vtag) => RcExt::unwrap_or_clone(vtag)
.hydrate(root, parent_scope, parent, fragment)
.into(),
VNode::VText(vtext) => vtext.hydrate(root, parent_scope, parent, fragment).into(),
VNode::VComp(vcomp) => vcomp.hydrate(root, parent_scope, parent, fragment).into(),
VNode::VList(vlist) => vlist.hydrate(root, parent_scope, parent, fragment).into(),
VNode::VComp(vcomp) => RcExt::unwrap_or_clone(vcomp)
.hydrate(root, parent_scope, parent, fragment)
.into(),
VNode::VList(vlist) => RcExt::unwrap_or_clone(vlist)
.hydrate(root, parent_scope, parent, fragment)
.into(),
// You cannot hydrate a VRef.
VNode::VRef(_) => {
panic!(
Expand All @@ -299,7 +305,7 @@ mod feat_hydration {
use_effect."
)
}
VNode::VSuspense(vsuspense) => vsuspense
VNode::VSuspense(vsuspense) => RcExt::unwrap_or_clone(vsuspense)
.hydrate(root, parent_scope, parent, fragment)
.into(),
VNode::VRaw(vraw) => vraw.hydrate(root, parent_scope, parent, fragment).into(),
Expand Down

0 comments on commit 56eb9c8

Please sign in to comment.