Skip to content

Reactivity throws Svelte error: flush_sync_in_effect when upgrading from 5.35.0 to >=5.36.0 #17131

@Hugos68

Description

@Hugos68

Describe the bug

The 5.36.0 version throws Svelte error: flush_sync_in_effect when clicking the Open button, this is a unexpected regression.

Reproduction

Steps:

  1. Open the REPL
  2. Click on Open
  3. View console to see crash: Svelte error: flush_sync_in_effect

Logs

Error
Svelte error: flush_sync_in_effect
Cannot use `flushSync` inside an effect
https://svelte.dev/e/flush_sync_in_effect
    at flush_sync_in_effect (playground:output:462:18)
    at flushSync (playground:output:2429:4)
    at flush (playground:output:9902:3)
    at setInitial (playground:output:11802:10)
    at action (playground:output:9715:9)
    at eval (playground:output:11630:8)
    at $effect (playground:output:9573:5)
    at update_reaction (playground:output:4178:57)
    at update_effect (playground:output:4358:19)
    at flush_queued_effects (playground:output:2520:6)

System Info

-

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions