Skip to content

Commit 1006943

Browse files
committed
tweak_self_invalidation
1 parent 5fe0272 commit 1006943

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.changeset/rare-hounds-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
chore: tweak effect self invalidation logic

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export function internal_set(source, value) {
190190
if (
191191
is_runes() &&
192192
active_effect !== null &&
193+
!untracking &&
193194
(active_effect.f & CLEAN) !== 0 &&
194195
(active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0
195196
) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ export function update_reaction(reaction) {
457457
if (
458458
is_runes() &&
459459
untracked_writes !== null &&
460+
deps !== null &&
460461
(reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0
461462
) {
462463
for (i = 0; i < /** @type {Source[]} */ (untracked_writes).length; i++) {

0 commit comments

Comments
 (0)