Skip to content

fix: prevent false-positive reactivity loss warning#18373

Merged
Rich-Harris merged 3 commits into
mainfrom
reactivitiy-loss-warning-fix
Jun 4, 2026
Merged

fix: prevent false-positive reactivity loss warning#18373
Rich-Harris merged 3 commits into
mainfrom
reactivitiy-loss-warning-fix

Conversation

@dummdidumm

Copy link
Copy Markdown
Member

By checking that current/previous batch are null we filter out false positives. reactivity_loss_tracker is only reset after a microtask, so if a flush happens before that, we get warnings for things we shouldn't warn on.

Fixes #18370

By checking that current/previous batch are null we filter out false positives. `reactivity_loss_tracker` is only reset after a microtask, so if a flush happens before that, we get warnings for things we shouldn't warn on.

Fixes #18370
@changeset-bot

changeset-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4076549

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svelte-docs-bot

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@18373

@Rich-Harris Rich-Harris merged commit 3d5c4ab into main Jun 4, 2026
20 checks passed
@Rich-Harris Rich-Harris deleted the reactivitiy-loss-warning-fix branch June 4, 2026 01:49
@github-actions github-actions Bot mentioned this pull request Jun 4, 2026
dummdidumm pushed a commit that referenced this pull request Jun 4, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## svelte@5.56.2

### Patch Changes

- fix: properly track effect end node for async sibling component
([#18371](#18371))

- fix: prevent false-positive reactivity loss warning
([#18373](#18373))

- chore: bump esrap dependency
([#18372](#18372))

- fix: ignore declaration tags for animation directive
([#18366](#18366))

- fix: reject pending async deriveds on discard
([#18308](#18308))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

await_reactivity_loss: false positive on a synchronous read in an unrelated component (leaked global tracker)

2 participants