File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/svelte/src/internal/client/dom Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -178,22 +178,24 @@ export function comment(anchor) {
178
178
* @returns {import('#client').Dom }
179
179
*/
180
180
function close_template ( dom , is_fragment , anchor ) {
181
+ var current = dom ;
182
+
181
183
if ( ! hydrating ) {
182
184
if ( is_fragment ) {
183
185
// if hydrating, `dom` is already an array of nodes, but if not then
184
186
// we need to create an array to store it on the current effect
185
- dom = /** @type {import('#client').Dom } */ ( [ .../** @type {Node } */ ( dom ) . childNodes ] ) ;
187
+ current = /** @type {import('#client').Dom } */ ( [ .../** @type {Node } */ ( dom ) . childNodes ] ) ;
186
188
}
187
189
188
190
if ( anchor !== null ) {
189
191
// TODO as with `open_template — why is this sometimes null and sometimes not?
190
- insert ( dom , anchor ) ;
192
+ insert ( current , anchor ) ;
191
193
}
192
194
}
193
195
194
- /** @type {import('#client').Effect } */ ( current_effect ) . dom = dom ;
196
+ /** @type {import('#client').Effect } */ ( current_effect ) . dom = current ;
195
197
196
- return dom ;
198
+ return current ;
197
199
}
198
200
199
201
/**
You can’t perform that action at this time.
0 commit comments