Skip to content

Commit 7a5fd29

Browse files
committed
fix
1 parent 52c6ab5 commit 7a5fd29

File tree

1 file changed

+8
-11
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+8
-11
lines changed

packages/svelte/src/internal/client/reactivity/sources.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,6 @@ function mark_reactions(signal, status) {
314314
var reaction = reactions[i];
315315
var flags = reaction.f;
316316

317-
// Skip any effects that are already dirty
318-
if ((flags & DIRTY) !== 0) continue;
319-
320317
// In legacy mode, skip the current effect to prevent infinite loops
321318
if (!runes && reaction === active_effect) continue;
322319

@@ -326,15 +323,15 @@ function mark_reactions(signal, status) {
326323
continue;
327324
}
328325

329-
set_signal_status(reaction, status);
326+
// don't set a DIRTY reaction to MAYBE_DIRTY
327+
if ((flags & DIRTY) === 0) {
328+
set_signal_status(reaction, status);
329+
}
330330

331-
// If the signal a) was previously clean or b) is an unowned derived, then mark it
332-
if ((flags & (CLEAN | UNOWNED)) !== 0) {
333-
if ((flags & DERIVED) !== 0) {
334-
mark_reactions(/** @type {Derived} */ (reaction), MAYBE_DIRTY);
335-
} else {
336-
schedule_effect(/** @type {Effect} */ (reaction));
337-
}
331+
if ((flags & DERIVED) !== 0) {
332+
mark_reactions(/** @type {Derived} */ (reaction), MAYBE_DIRTY);
333+
} else if ((flags & DIRTY) === 0) {
334+
schedule_effect(/** @type {Effect} */ (reaction));
338335
}
339336
}
340337
}

0 commit comments

Comments
 (0)