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

3.23.1 and above breaks {#each} bind:this case #5067

Closed
Xerios opened this issue Jun 25, 2020 · 1 comment · Fixed by #5072
Closed

3.23.1 and above breaks {#each} bind:this case #5067

Xerios opened this issue Jun 25, 2020 · 1 comment · Fixed by #5072
Labels

Comments

@Xerios
Copy link

Xerios commented Jun 25, 2020

Describe the bug
After upgrading svelte in our project we noticed an issue with bind:this behaviour inside {#each}.
This works with previous versions but it's broken starting from 3.23.1

I've made a simple example that reproduces this bug.

To Reproduce
works: https://svelte.dev/repl/a37014bd0ece412093b891a71c08f954?version=3.23.0
broken: https://svelte.dev/repl/a37014bd0ece412093b891a71c08f954?version=3.23.1
broken: https://svelte.dev/repl/a37014bd0ece412093b891a71c08f954?version=3.23.2

You should see an array with all ref properties filled, but for versions above 3.23.0 what you get is the following:

[{ref: div},
{ref: null}, // <-- second element is null
{ref: div}]
@Conduitry
Copy link
Member

This should be fixed in 3.24.0 - https://svelte.dev/repl/a37014bd0ece412093b891a71c08f954?version=3.24.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