From bf6a7653289c5d7405d27756d806c55ec1f07508 Mon Sep 17 00:00:00 2001 From: jimafisk Date: Thu, 22 Oct 2020 15:16:02 -0400 Subject: [PATCH] Modify svelte to allow hydrating HTML wrapper (#65). --- defaults_node_modules/svelte/internal/index.mjs | 4 +++- generated/defaults_node_modules.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/defaults_node_modules/svelte/internal/index.mjs b/defaults_node_modules/svelte/internal/index.mjs index 9d64fcc8..7c2cf824 100644 --- a/defaults_node_modules/svelte/internal/index.mjs +++ b/defaults_node_modules/svelte/internal/index.mjs @@ -176,7 +176,9 @@ function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { - target.insertBefore(node, anchor || null); + if (target != document) { + target.insertBefore(node, anchor || null); + } } function detach(node) { node.parentNode.removeChild(node); diff --git a/generated/defaults_node_modules.go b/generated/defaults_node_modules.go index 2dfbc2d1..d3dbe7a7 100644 --- a/generated/defaults_node_modules.go +++ b/generated/defaults_node_modules.go @@ -32136,7 +32136,9 @@ function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { - target.insertBefore(node, anchor || null); + if (target != document) { + target.insertBefore(node, anchor || null); + } } function detach(node) { node.parentNode.removeChild(node);