Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix(connectQueryRules): fix crash when using connectQueryRules in multiple indexes #2903

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

yannickcr
Copy link
Contributor

Summary

Fixes #2902

searchState.indices is undefined if the widget is initialized with an empty searchState, triggering an error during the initial call to getSearchParameters.

This PR fix it by adding a check on searchState.indices presence before trying to use it.

@yannickcr yannickcr requested review from francoischalifour and a team March 27, 2020 15:27
@ghost ghost requested review from eunjae-lee and removed request for a team March 27, 2020 15:27
@yannickcr yannickcr changed the title fix(connectQueryRules): fix crash when using connectQueryRules in mul… fix(connectQueryRules): fix crash when using connectQueryRules in multiple indexes Mar 27, 2020
@algobot
Copy link
Contributor

algobot commented Mar 27, 2020

Deploy preview for react-instantsearch ready!

Built with commit 3edf700

https://deploy-preview-2903--react-instantsearch.netlify.com

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@yannickcr yannickcr merged commit c66d612 into master Mar 27, 2020
@yannickcr yannickcr deleted the fix/connectqueryrules branch March 27, 2020 15:58
yannickcr added a commit that referenced this pull request May 18, 2020
# [6.5.0](v6.4.0...v6.5.0) (2020-05-18)

### Bug Fixes

* **connectQueryRules:** fix crash when using connectQueryRules with multiple indexes ([#2903](#2903)) ([c66d612](c66d612))
* **core:** fix maximum call stack size exceeded ([#2926](#2926)) ([7e883df](7e883df))

### Features

* **SearchBox:** provide input element ref ([#2913](#2913)) ([b41bff2](b41bff2))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QueryRuleContext widget crashes when used in Index
4 participants