File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { DEV } from 'esm-env' ;
2
- import { append_child , create_element , empty , init_operations } from './dom/operations.js' ;
2
+ import {
3
+ append_child ,
4
+ clear_text_content ,
5
+ create_element ,
6
+ empty ,
7
+ init_operations
8
+ } from './dom/operations.js' ;
3
9
import { PassiveDelegatedEvents } from '../../constants.js' ;
4
10
import { remove } from './dom/reconciler.js' ;
5
11
import { flush_sync , push , pop , current_component_context } from './runtime.js' ;
@@ -170,9 +176,9 @@ export function hydrate(component, options) {
170
176
: '' ) ,
171
177
error
172
178
) ;
173
- remove ( nodes ) ;
174
- first_child . remove ( ) ;
175
- nodes [ nodes . length - 1 ] ?. nextSibling ?. remove ( ) ;
179
+
180
+ clear_text_content ( container ) ;
181
+
176
182
set_hydrating ( false ) ;
177
183
return mount ( component , options ) ;
178
184
} else {
You can’t perform that action at this time.
0 commit comments