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

Fix route reducer crash #350

Merged
merged 2 commits into from
Apr 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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