Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Commit

Permalink
Parsing the query string on location change
Browse files Browse the repository at this point in the history
There was an issue when using the back button to navigate to a route
that had a query string in it. It would be available in the search
field, but it was not available as a query object.

This commit simply performs the same parsing of the query string that
the ROUTER_POP state receives.
  • Loading branch information
Duncan Regan committed Jul 11, 2017
1 parent 6aa3297 commit b29ba43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/enhancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export default ({ history, matchRoute, createMatcher }: EnhancerArgs) => (
store.dispatch(
locationDidChange({
...location,
...match
...match,
query: qs.parse(location.search)
})
);
});
Expand Down

0 comments on commit b29ba43

Please sign in to comment.