From 32ce595091f0457acf2a7578a4b02aab8367954c 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 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); } }