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

fix(InstantSearch): remove event listeners #3420

Merged
merged 2 commits into from
Jan 24, 2019
Merged

fix(InstantSearch): remove event listeners #3420

merged 2 commits into from
Jan 24, 2019

Conversation

samouss
Copy link
Contributor

@samouss samouss commented Jan 24, 2019

Summary

We recently updated the dispose function to set the helper to null. It's indeed the right approach but it might happen that a render occurs after the dispose e.g startdispose right after the start. The search is async so the render is called after we set the helper to null and it throws an error. To avoid this issue we have to remove the listeners on the helper before we lose his reference.

@samouss samouss requested a review from a team January 24, 2019 08:56
@algobot
Copy link
Contributor

algobot commented Jan 24, 2019

Deploy preview for instantsearchjs ready!

Built with commit be0cbf2

https://deploy-preview-3420--instantsearchjs.netlify.com

@samouss samouss changed the title Fix/dispose fix(InstantSearch): remove event listeners Jan 24, 2019
@samouss samouss merged commit 6a12cb7 into develop Jan 24, 2019
@samouss samouss deleted the fix/dispose branch January 24, 2019 13:51
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.

3 participants