From 896dc2a013d028c4c39d4aece0f45e2e8f3211c0 Mon Sep 17 00:00:00 2001 From: Altan Birler Date: Sun, 25 Jul 2021 20:57:41 +0200 Subject: [PATCH] fix append not moving existing node to the end --- src/runtime/internal/dom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index f563f6d099..3cf2ca7c48 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -185,7 +185,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); } }