Skip to content

flushSync set state wrapped in #if that should be releaved, breaks reactivity temporarily #16076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
raythurnvoid opened this issue Jun 3, 2025 · 0 comments
Labels
p0 stuff we should fix ASAP

Comments

@raythurnvoid
Copy link
Contributor

raythurnvoid commented Jun 3, 2025

Describe the bug

When updating a $state that is used to interpolate the value inside an if block using flushSync, and that same if block should be revealed by another $state, the reactivity temporarily breaks until the if becomes falsy again.

Regression introduced in 5.28.3 version.
This is the culprit commit: #15895

Reproduction

https://svelte.dev/playground/a89aaf76146c4571a996d7cd02e39d2f?version=5.33.14

System Info

(Svelte Playground - Edge 136.0.3240.92)

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p0 stuff we should fix ASAP
Projects
None yet
Development

No branches or pull requests

2 participants