MCPcopy
hub / github.com/sveltejs/svelte / unlink_effect

Function unlink_effect

packages/svelte/src/internal/client/reactivity/effects.js:585–597  ·  view source on GitHub ↗
(effect)

Source from the content-addressed store, hash-verified

583 * @param {Effect} effect
584 */
585export function unlink_effect(effect) {
586 var parent = effect.parent;
587 var prev = effect.prev;
588 var next = effect.next;
589
590 if (prev !== null) prev.next = next;
591 if (next !== null) next.prev = prev;
592
593 if (parent !== null) {
594 if (parent.first === effect) parent.first = next;
595 if (parent.last === effect) parent.last = prev;
596 }
597}
598
599/**
600 * When a block effect is removed, we don't immediately destroy it or yank it

Callers 2

flush_queued_effectsFunction · 0.90
destroy_effectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected