(
node: Comment,
vnode: VNode,
parentComponent: ComponentInternalInstance | null,
parentSuspense: SuspenseBoundary | null,
slotScopeIds: string[] | null,
optimized: boolean,
)
| 646 | } |
| 647 | |
| 648 | const hydrateFragment = ( |
| 649 | node: Comment, |
| 650 | vnode: VNode, |
| 651 | parentComponent: ComponentInternalInstance | null, |
| 652 | parentSuspense: SuspenseBoundary | null, |
| 653 | slotScopeIds: string[] | null, |
| 654 | optimized: boolean, |
| 655 | ) => { |
| 656 | const { slotScopeIds: fragmentSlotScopeIds } = vnode |
| 657 | if (fragmentSlotScopeIds) { |
| 658 | slotScopeIds = slotScopeIds |
| 659 | ? slotScopeIds.concat(fragmentSlotScopeIds) |
| 660 | : fragmentSlotScopeIds |
| 661 | } |
| 662 | |
| 663 | const container = parentNode(node)! |
| 664 | const next = hydrateChildren( |
| 665 | nextSibling(node)!, |
| 666 | vnode, |
| 667 | container, |
| 668 | parentComponent, |
| 669 | parentSuspense, |
| 670 | slotScopeIds, |
| 671 | optimized, |
| 672 | ) |
| 673 | if (next && isComment(next) && next.data === ']') { |
| 674 | return nextSibling((vnode.anchor = next)) |
| 675 | } else { |
| 676 | // fragment didn't hydrate successfully, since we didn't get a end anchor |
| 677 | // back. This should have led to node/children mismatch warnings. |
| 678 | logMismatchError() |
| 679 | |
| 680 | // since the anchor is missing, we need to create one and insert it |
| 681 | insert((vnode.anchor = createComment(`]`)), container, next) |
| 682 | return next |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | const handleMismatch = ( |
| 687 | node: Node, |
no test coverage detected