Skip to content

Commit ea4843c

Browse files
authored
fix: avoid unnecessary read version increments (#15777)
Fixes #15262
1 parent e079ac9 commit ea4843c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
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+
fix: avoid unnecessary read version increments

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export function update_reaction(reaction) {
469469
// we need to increment the read version to ensure that
470470
// any dependencies in this reaction aren't marked with
471471
// the same version
472-
if (previous_reaction !== reaction) {
472+
if (previous_reaction !== null && previous_reaction !== reaction) {
473473
read_version++;
474474

475475
if (untracked_writes !== null) {

0 commit comments

Comments
 (0)