From b8a1d7a8b6a4ab323fe504b4fa0d0d50a004977c Mon Sep 17 00:00:00 2001 From: Tal Hadad Date: Mon, 25 Jul 2022 23:35:58 +0300 Subject: [PATCH] use `Node.parentNode` instead `Node.parentElement` in `dom.ts`. This is for a simple legacy browsers compatibility (specifically, IE11). --- src/runtime/internal/dom.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 072506629c..8436e599e6 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -163,7 +163,8 @@ export function append_hydration(target: NodeEx, node: NodeEx) { if (is_hydrating) { init_hydrate(target); - if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) { + // Note: It is important to use `Node.parentNode` instead `Node.parentElement` for a simple legacy browsers compatibility. + if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) { target.actual_end_child = target.firstChild; }