Skip to content

Reactive statement not fired #4811

@null-dev

Description

@null-dev

Describe the bug
In some strange cases, the reactive statement that depends on a variable doesn't get fired when the variable changes.

To Reproduce
See this REPL:
https://svelte.dev/repl/4c2b3a63f4ed4b718561ba6ca7a62629?version=3.22.2

In the REPL, there is a reactive statement that will log the value of a to the console every time it changes (line 11). There is another reactive statement that will change the value of a whenever the value of b changes (line 13). Notice that when we change the value of b by clicking the button, the value of a does change, yet the reactive statement that depends on a (line 11) is not called!

I'm currently running Chrome 81 on Linux.

Workaround:
We can make the above REPL work again by moving line 13 to line 4.

Severity
Medium, since we can still workaround it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions