Skip to content

Commit

Permalink
allow document level hydration (sveltejs#5547).
Browse files Browse the repository at this point in the history
  • Loading branch information
jimafisk committed Dec 4, 2020
1 parent e02c291 commit 3ff2e00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/internal/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export function append(target: Node, node: Node) {
}

export function insert(target: Node, node: Node, anchor?: Node) {
target.insertBefore(node, anchor || null);
if (target != document) {
target.insertBefore(node, anchor || null);
}
}

export function detach(node: Node) {
Expand Down

0 comments on commit 3ff2e00

Please sign in to comment.