Skip to content

Commit 61f0793

Browse files
committed
simplify
1 parent 8aace6e commit 61f0793

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/svelte/src/internal/client/dom/template.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { hydrate_nodes, hydrating } from './hydration.js';
22
import { clone_node, empty } from './operations.js';
3-
import { create_fragment_from_html, insert } from './reconciler.js';
3+
import { create_fragment_from_html } from './reconciler.js';
44
import { current_effect } from '../runtime.js';
55
import { TEMPLATE_FRAGMENT, TEMPLATE_USE_IMPORT_NODE } from '../../../constants.js';
66

@@ -171,8 +171,7 @@ export function append(anchor, dom) {
171171
current = /** @type {import('#client').Dom} */ ([...node.childNodes]);
172172
}
173173

174-
// TODO ideally we'd do `anchor.before(dom)`, but that fails because `dom` can be an array of nodes in the SVG case
175-
insert(current, anchor);
174+
anchor.before(node);
176175
}
177176

178177
/** @type {import('#client').Effect} */ (current_effect).dom = current;

0 commit comments

Comments
 (0)