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

fix(connectInfiniteHits): always set a value for previous page #1195

Merged
merged 2 commits into from
May 14, 2018

Conversation

samouss
Copy link
Collaborator

@samouss samouss commented Apr 26, 2018

Summary

Prevent the connectInfinteHits connector to render an empty array when the previous page is not defined. When it's undefined all the tests regarding the page will fail because we compare a number with undefined and it's always false.

Before

before

After

after

You can also test it live:

@algobot
Copy link
Contributor

algobot commented Apr 26, 2018

Deploy preview for react-instantsearch ready!

Built with commit 509a530

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

@samouss samouss changed the title Fix/infinite hits fix(connectInfiniteHits): always set a value for previous page Apr 26, 2018
@samouss samouss merged commit 4c218d5 into master May 14, 2018
@samouss samouss deleted the fix/infinite-hits branch May 14, 2018 07:24
samouss added a commit that referenced this pull request May 28, 2018
<a name="5.1.0"></a>
# [5.1.0](v5.0.3...v5.1.0) (2018-05-28)

### Bug Fixes

* **connectInfiniteHits:** always set a value for previous page ([#1195](#1195)) ([4c218d5](4c218d5))
* **indexUtils:** avoid throw an error on cleanUp multi indices ([#1265](#1265)) ([12f5ace](12f5ace))

### Features

* **searchClient:** Add support for custom Search Clients ([#1216](#1216)) ([174cc28](174cc28))
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.

3 participants