We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9290983 commit 9083decCopy full SHA for 9083dec
packages/svelte/src/internal/client/reactivity/effects.js
@@ -234,6 +234,12 @@ export function branch(fn) {
234
* @returns {void}
235
*/
236
export function destroy_effect(effect) {
237
+ var dom = effect.dom;
238
+
239
+ if (dom !== null) {
240
+ remove(dom);
241
+ }
242
243
destroy_effect_children(effect);
244
remove_reactions(effect, 0);
245
set_signal_status(effect, DESTROYED);
@@ -246,10 +252,6 @@ export function destroy_effect(effect) {
246
252
247
253
effect.teardown?.call(null);
248
254
249
- if (effect.dom !== null) {
250
- remove(effect.dom);
251
- }
-
255
var parent = effect.parent;
256
257
// If the parent doesn't have any children, then skip this work altogether
0 commit comments