Skip to content

Commit 7f3a586

Browse files
committed
fix: do not defer unmount; immediately unmount components
1 parent a543559 commit 7f3a586

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/svelte/src/internal/client/dom/blocks/svelte-component.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ export function component(node, get_component, render_fn) {
3434
var pending_effect = null;
3535

3636
function commit() {
37-
if (effect) {
38-
pause_effect(effect);
39-
effect = null;
40-
}
41-
4237
if (offscreen_fragment) {
4338
// remove the anchor
4439
/** @type {Text} */ (offscreen_fragment.lastChild).remove();
@@ -56,6 +51,11 @@ export function component(node, get_component, render_fn) {
5651

5752
var defer = should_defer_append();
5853

54+
if (effect) {
55+
pause_effect(effect);
56+
effect = null;
57+
}
58+
5959
if (component) {
6060
var target = anchor;
6161

0 commit comments

Comments
 (0)