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

Make sure getInitialState return an object with search #374

Merged

Conversation

abhishiv
Copy link
Contributor

@abhishiv abhishiv commented Oct 4, 2019

For fixing #372

Without this, if you navigate to same route with same pathname but different query parameters, query params don't update since this if block gets triggered due to initialstate.location being undefined.

route &&
      !action.error &&
      (typeof route === 'string' || route.path) &&
      (action.meta.location.current.pathname === state.pathname &&
        action.meta.location.current.search === state.search &&
        action.meta.location.kind !== state.kind
      )
  ) {
    return {
      ...state,
      kind: action.meta.location.kind
    }
  }

this issue happens from transitioning from http://localhost:8000/?category_id=1&page=1&sort_by=ean%3AASC to http://localhost:8000/ using NavLink from redux-first-router-link

@ScriptedAlchemy ScriptedAlchemy merged commit be814fb into faceyspacey:master Oct 4, 2019
@faceyspacey
Copy link
Owner

🎉 This PR is included in version 2.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants