Skip to content
This repository has been archived by the owner on Oct 26, 2018. It is now read-only.

Commit

Permalink
Merge pull request #350 from mindjuice/fix-route-reducer-crash
Browse files Browse the repository at this point in the history
Fix route reducer crash
  • Loading branch information
timdorr committed Apr 6, 2016
2 parents 31d5b92 + a727d10 commit 0188f52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down

0 comments on commit 0188f52

Please sign in to comment.