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

update bind:this references when setting to null #3145

Merged
merged 1 commit into from
Jul 1, 2019
Merged

Conversation

Rich-Harris
Copy link
Member

This fixes #2034 by using binding_callbacks when setting the foo in bind:this={foo} to null as well as when setting it to an element reference. Otherwise, the invalidation has no effect.

We still need to null out references before setting new ones, in order to avoid glitches when lists are reordered. This is done by unshifting to binding_callbacks the functions that need to run later, as those functions are run in reverse order.

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

Successfully merging this pull request may close these issues.

bound element references arent triggering subscriptions when changing to null
1 participant