chore: default remove_dom to false (#12267)

pull/12268/head
Rich Harris 6 months ago committed by GitHub
parent 5ce7599f3d
commit ebf72beb73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -63,15 +63,16 @@ export function derived_safe_equal(fn) {
}
/**
* @param {import('#client').Derived} signal
* @param {import('#client').Derived} derived
* @returns {void}
*/
function destroy_derived_children(signal) {
destroy_effect_children(signal);
var deriveds = signal.deriveds;
function destroy_derived_children(derived) {
destroy_effect_children(derived);
var deriveds = derived.deriveds;
if (deriveds !== null) {
signal.deriveds = null;
derived.deriveds = null;
for (var i = 0; i < deriveds.length; i += 1) {
destroy_derived(deriveds[i]);
}

@ -438,18 +438,17 @@ export function remove_reactions(signal, start_index) {
/**
* @param {import('#client').Reaction} signal
* @param {boolean} [remove_dom]
* @param {boolean} remove_dom
* @returns {void}
*/
export function destroy_effect_children(signal, remove_dom = true) {
let effect = signal.first;
signal.first = null;
signal.last = null;
var sibling;
export function destroy_effect_children(signal, remove_dom = false) {
var effect = signal.first;
signal.first = signal.last = null;
while (effect !== null) {
sibling = effect.next;
var next = effect.next;
destroy_effect(effect, remove_dom);
effect = sibling;
effect = next;
}
}

Loading…
Cancel
Save