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 } }