Skip to content

Commit

Permalink
chore: deduplicate code (#11534)
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed May 10, 2024
1 parent 4b7e002 commit f70c037
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions packages/svelte/src/internal/client/runtime.js
Expand Up @@ -550,21 +550,14 @@ function process_effects(effect, filter_flags, shallow, collected_effects) {
}

if ((flags & RENDER_EFFECT) !== 0) {
if (is_branch) {
if (!shallow && child !== null) {
current_effect = child;
continue;
}
} else {
if (check_dirtiness(current_effect)) {
execute_effect(current_effect);
// Child might have been mutated since running the effect
child = current_effect.first;
}
if (!shallow && child !== null) {
current_effect = child;
continue;
}
if (!is_branch && check_dirtiness(current_effect)) {
execute_effect(current_effect);
// Child might have been mutated since running the effect
child = current_effect.first;
}
if (!shallow && child !== null) {
current_effect = child;
continue;
}
} else if ((flags & EFFECT) !== 0) {
if (is_branch || is_clean) {
Expand Down

0 comments on commit f70c037

Please sign in to comment.