From b29ba43beff308c10e34753360288382ff032f1e Mon Sep 17 00:00:00 2001 From: Duncan Regan Date: Tue, 11 Jul 2017 13:46:28 -0400 Subject: [PATCH] Parsing the query string on location change 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. --- src/enhancer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/enhancer.js b/src/enhancer.js index 05da172f..cb365fa3 100644 --- a/src/enhancer.js +++ b/src/enhancer.js @@ -71,7 +71,8 @@ export default ({ history, matchRoute, createMatcher }: EnhancerArgs) => ( store.dispatch( locationDidChange({ ...location, - ...match + ...match, + query: qs.parse(location.search) }) ); });