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(core): make sure instance.dispose sets started flag #3399

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Jan 18, 2019

This can not immediately cause any bugs; but in Vue InstantSearch we were manually calling render before init gets called. Since render itself (obviously) assumes the search is already done, it uses helper functions of past-search.

This fix prevents such a situation, since started would be false as long as the next search has not yet been done

see also algolia/vue-instantsearch#607

This can not immediately cause any bugs; but in Vue InstantSearch we were manually calling `render` before `init` gets called. Since `render` itself (obviously) assumes the search is already done, it uses helper functions of past-search.

This fix prevents such a situation, since `started` would be false as long as the next search has not yet been done

see also algolia/vue-instantsearch#607
@algobot
Copy link
Contributor

algobot commented Jan 18, 2019

Deploy preview for instantsearchjs ready!

Built with commit b3c6674

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

@francoischalifour francoischalifour merged commit 7430b92 into develop Jan 18, 2019
@francoischalifour francoischalifour deleted the fix/dispose-start branch January 18, 2019 12:12
Haroenv added a commit that referenced this pull request Jan 21, 2019
Without this change, if you dispose an instance and start it again, a search (not necessarily a request, since the cache isn't cleared) should be done again with a fresh state, and not the state of before the dispose

similar to #3399
francoischalifour pushed a commit that referenced this pull request Jan 23, 2019
Without this change, if you dispose an instance and start it again, a search (not necessarily a request, since the cache isn't cleared) should be done again with a fresh state, and not the state of before the dispose

similar to #3399
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.

4 participants