diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index e9976a7fa6d8..f3fa7716735e 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -186,7 +186,7 @@ export function append_hydration(target: NodeEx, node: NodeEx) { } else { target.actual_end_child = node.nextSibling; } - } else if (node.parentNode !== target) { + } else if (node.parentNode !== target || node.nextSibling !== null) { target.appendChild(node); } }