Skip to content
This repository was archived by the owner on Dec 15, 2018. It is now read-only.

Commit a606523

Browse files
authored
Parse query string on back button (#131)
1 parent 3522ad3 commit a606523

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/store-enhancer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import type {
88

99
import type { History } from 'history';
1010

11+
import qs from 'query-string';
12+
1113
import { default as matcherFactory } from './create-matcher';
1214
import attachRouterToReducer from './reducer-enhancer';
1315
import { locationDidChange } from './action-creators';
@@ -64,6 +66,7 @@ export default ({
6466
/* istanbul ignore else */
6567
if (newLocation) {
6668
matchCache.clear();
69+
newLocation.query = qs.parse(newLocation.search);
6770
store.dispatch(locationDidChange({
6871
location: newLocation,
6972
matchRoute

0 commit comments

Comments
 (0)