Skip to content

Commit fb775b2

Browse files
committed
more
1 parent dea2ded commit fb775b2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,13 @@ export function child(node, is_text) {
128128

129129
/**
130130
* Don't mark this as side-effect-free, hydration needs to walk all nodes
131-
* @param {DocumentFragment | TemplateNode | TemplateNode[]} fragment
131+
* @param {TemplateNode} node
132132
* @param {boolean} [is_text]
133-
* @returns {Node | null}
133+
* @returns {TemplateNode | null}
134134
*/
135-
export function first_child(fragment, is_text = false) {
135+
export function first_child(node, is_text = false) {
136136
if (!hydrating) {
137-
// when not hydrating, `fragment` is a `DocumentFragment` (the result of calling `open_frag`)
138-
var first = /** @type {DocumentFragment} */ (get_first_child(/** @type {Node} */ (fragment)));
137+
var first = get_first_child(node);
139138

140139
// TODO prevent user comments with the empty string when preserveComments is true
141140
if (first instanceof Comment && first.data === '') return get_next_sibling(first);

0 commit comments

Comments
 (0)