Skip to content

Commit 68035ca

Browse files
committed
chore: deduplicate code
1 parent 59f4feb commit 68035ca

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -550,21 +550,14 @@ function process_effects(effect, filter_flags, shallow, collected_effects) {
550550
}
551551

552552
if ((flags & RENDER_EFFECT) !== 0) {
553-
if (is_branch) {
554-
if (!shallow && child !== null) {
555-
current_effect = child;
556-
continue;
557-
}
558-
} else {
559-
if (check_dirtiness(current_effect)) {
560-
execute_effect(current_effect);
561-
// Child might have been mutated since running the effect
562-
child = current_effect.first;
563-
}
564-
if (!shallow && child !== null) {
565-
current_effect = child;
566-
continue;
567-
}
553+
if (!is_branch && check_dirtiness(current_effect)) {
554+
execute_effect(current_effect);
555+
// Child might have been mutated since running the effect
556+
child = current_effect.first;
557+
}
558+
if (!shallow && child !== null) {
559+
current_effect = child;
560+
continue;
568561
}
569562
} else if ((flags & EFFECT) !== 0) {
570563
if (is_branch || is_clean) {

0 commit comments

Comments
 (0)