Skip to content

Commit 66064fc

Browse files
committed
fix root context
1 parent 41fa2a4 commit 66064fc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/svelte/src/internal/client/render.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ function _mount(Component, { target, anchor, props = {}, events, context, intro
208208
var anchor_node = anchor ?? target.appendChild(create_text());
209209

210210
branch(() => {
211+
push({});
212+
211213
if (context) {
212-
push({});
213214
var ctx = /** @type {ComponentContext} */ (component_context);
214215
ctx.c = context;
215216
}
@@ -232,9 +233,7 @@ function _mount(Component, { target, anchor, props = {}, events, context, intro
232233
/** @type {Effect} */ (active_effect).nodes_end = hydrate_node;
233234
}
234235

235-
if (context) {
236-
pop();
237-
}
236+
pop();
238237
});
239238

240239
return () => {

0 commit comments

Comments
 (0)