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

Call ondestroy before cleanup #706

Closed
Rich-Harris opened this issue Jul 10, 2017 · 4 comments
Closed

Call ondestroy before cleanup #706

Rich-Harris opened this issue Jul 10, 2017 · 4 comments
Labels

Comments

@Rich-Harris
Copy link
Member

So that this.refs is still populated, etc. From this Gitter convo

@Rich-Harris
Copy link
Member Author

Huh, seems this already happens in the expected order. @stalkerg can you provide a repro showing the bug you mentioned in Gitter (the Charts.js thing)?

@TehShrike
Copy link
Member

A possible reproduction help: when I uncomment this line: https://github.com/TehShrike/svelte-1-25-0-array-binding-repro/blob/17e64d2b7292b824b8805b66443515cd411f11df/src/Top.html#L16 and start adding/removing elements by changing the number in the input, I observe some thrown errors.

@stalkerg
Copy link
Contributor

@Rich-Harris please https://svelte.technology/repl?version=1.25.0&gist=c111d07479b9e65c9476bcb246944113
(you should watch logs and decrease number)
the main problem then you start using IF statement.

Rich-Harris added a commit that referenced this issue Jul 29, 2017
clear refs in destroy, not unmount, so that refs are populated in ondestroy
@Rich-Harris
Copy link
Member Author

This is fixed in 1.27

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

No branches or pull requests

3 participants