From a727d1047500e1d6c27479fc8210264b4e0c6bdd Mon Sep 17 00:00:00 2001 From: Ken Carpenter Date: Tue, 5 Apr 2016 15:43:41 -0700 Subject: [PATCH] Fixes #349 Fixes #349 in parent Also fixed a typo in the function comment. --- src/reducer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reducer.js b/src/reducer.js index 1d9a6c0..76ad7c1 100644 --- a/src/reducer.js +++ b/src/reducer.js @@ -12,9 +12,9 @@ const initialState = { * This reducer will update the state with the most recent location history * has transitioned to. This may not be in sync with the router, particularly * if you have asynchronously-loaded routes, so reading from and relying on - * this state it is discouraged. + * this state is discouraged. */ -export function routerReducer(state = initialState, { type, payload }) { +export function routerReducer(state = initialState, { type, payload } = {}) { if (type === LOCATION_CHANGE) { return { ...state, locationBeforeTransitions: payload } }