Skip to content

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

Open
@raythurnvoid

Description

@raythurnvoid

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    p0stuff we should fix ASAP

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions