Skip to content

Commit

Permalink
refactor(index): remove unnecessary page UI state reset branch (#4433)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour authored Jun 12, 2020
1 parent ec27201 commit ea6581b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/widgets/index/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,11 @@ const index = (props: IndexProps): Index => {
// configuration of the widget is pushed in the URL. That's what we want to avoid.
// https://github.com/algolia/instantsearch.js/pull/994/commits/4a672ae3fd78809e213de0368549ef12e9dc9454
helper.on('change', event => {
const { state, isPageReset } = event;
const { state } = event;

// @ts-ignore _uiState comes from privateHelperSetState and thus isn't typed on the helper event
const _uiState = event._uiState;

if (isPageReset) {
localUiState.page = undefined;
}

localUiState = getLocalWidgetsState(
localWidgets,
{
Expand Down

0 comments on commit ea6581b

Please sign in to comment.