pull/16625/head
Rich Harris 3 weeks ago
parent 2e02868ef1
commit 8d710765c2

@ -133,6 +133,7 @@ function create_effect(type, fn, sync, push = true) {
schedule_effect(effect);
}
if (push) {
// if an effect has no dependencies, no DOM and no teardown function,
// don't bother adding it to the effect tree
var inert =
@ -143,7 +144,7 @@ function create_effect(type, fn, sync, push = true) {
effect.teardown === null &&
(effect.f & EFFECT_PRESERVED) === 0;
if (!inert && push) {
if (!inert) {
if (parent !== null) {
push_effect(effect, parent);
}
@ -158,6 +159,7 @@ function create_effect(type, fn, sync, push = true) {
(derived.effects ??= []).push(effect);
}
}
}
return effect;
}

Loading…
Cancel
Save