Skip to content

chore: default remove_dom to false #12267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/svelte/src/internal/client/reactivity/deriveds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down
15 changes: 7 additions & 8 deletions packages/svelte/src/internal/client/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,18 +433,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;
}
}

Expand Down
Loading