Skip to content
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

Keyed each block is updated unnecessarily #4373

Closed
Rich-Harris opened this issue Feb 5, 2020 · 1 comment · Fixed by #4413
Closed

Keyed each block is updated unnecessarily #4373

Rich-Harris opened this issue Feb 5, 2020 · 1 comment · Fixed by #4413
Labels

Comments

@Rich-Harris
Copy link
Member

Describe the bug
In this app, via this SO question, a keyed each block is updated when any variable is reassigned, rather than only when the dependencies of the block are.

The update_keyed_each(...) call isn't being wrapped in an if (dirty & ...) block, as it should.

To Reproduce
https://svelte.dev/repl/191e46b4229043a89ac5018658a84ecb?version=3.18.1

Expected behavior
Adding items via the input shouldn't have any effect, because the array is being mutated but not reassigned.

Severity
Low

@Conduitry
Copy link
Member

This is no longer happening in 3.19.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants