File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/svelte/src/internal/client/dom Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments