Skip to content

Commit a4bf665

Browse files
committed
Support arrays of actions to listen for
1 parent b2779c8 commit a4bf665

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redux-router-querystring",
3-
"version": "0.0.10",
3+
"version": "0.0.11",
44
"description": "Redux middleware and reducer that handle synchronization between query strings and state.",
55
"main": "dist/index.js",
66
"scripts": {

src/routing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const queryStringMiddleware = (history, {reduxPathname, routes}, config =
5454
allowDots: true
5555
});
5656
const dataList = routesConfig.filter(
57-
({listen}) => listen === action.type
57+
({listen}) => Array.isArray(listen) ? listen.includes(action.type) : listen === action.type
5858
).map(({select, serialize}) => {
5959
const qsState = select(state);
6060
let data = _pruneNullLeaves(qsState);

0 commit comments

Comments
 (0)