Skip to content

Commit 6e39d2a

Browse files
committed
chore: allow <svelte:element> effects to be pruned
1 parent 787e091 commit 6e39d2a

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ import {
1010
} from '../../reactivity/effects.js';
1111
import { set_should_intro } from '../../render.js';
1212
import { current_each_item, set_current_each_item } from './each.js';
13-
import { current_component_context, current_effect } from '../../runtime.js';
13+
import { current_component_context } from '../../runtime.js';
1414
import { DEV } from 'esm-env';
1515
import { assign_nodes } from '../template.js';
16-
import { noop } from '../../../shared/utils.js';
1716
import { EFFECT_TRANSPARENT } from '../../constants.js';
1817

1918
/**
@@ -121,9 +120,6 @@ export function element(node, get_tag, is_svg, render_fn, get_namespace, locatio
121120
}
122121

123122
anchor.before(element);
124-
125-
// See below
126-
return noop;
127123
});
128124
}
129125

@@ -132,9 +128,5 @@ export function element(node, get_tag, is_svg, render_fn, get_namespace, locatio
132128
set_should_intro(true);
133129

134130
set_current_each_item(previous_each_item);
135-
136-
// Inert effects are proactively detached from the effect tree. Returning a noop
137-
// teardown function is an easy way to ensure that this is not discarded
138-
return noop;
139131
}, EFFECT_TRANSPARENT);
140132
}

0 commit comments

Comments
 (0)