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(index): allow dispose to be called before init #6173

Merged
merged 1 commit into from
May 2, 2024

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Apr 30, 2024

Summary

If init isn't called (this happens in React InstantSearch Next, as well as some other cases), then dispose on the actual widgets doesn't make sense to be called, because the helper is still null.

This does mean that some state could be considered stray (not cleaned up), but that likely doesn't matter as the index widget is removed anyway.

Result

fixes #6073

@Haroenv Haroenv requested review from a team, dhayab and sarahdayan and removed request for a team April 30, 2024 11:43
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c225ee4:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv Haroenv merged commit 1405aeb into master May 2, 2024
12 checks passed
@Haroenv Haroenv deleted the fix/index-dispose-before-init branch May 2, 2024 07:58
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.

TypeError: Cannot read property 'state' of null
2 participants