Skip to content

Commit

Permalink
fix(reducer): save last transition instead
Browse files Browse the repository at this point in the history
- rename initialState property
- save Transition instead of `to()` state in reducer
  • Loading branch information
elboman committed Mar 3, 2017
1 parent 6727b65 commit a94d716
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {

const initialState = {
transitioning: false,
current: {}
last: {}
}

export const routerReducer = (state = initialState, action) => {
Expand All @@ -21,7 +21,7 @@ export const routerReducer = (state = initialState, action) => {
case FINISH_TRANSITION: {
return {
transitioning: false,
last: action.transition.to()
last: action.transition
}
}
case IGNORED_TRANSITION: {
Expand Down

0 comments on commit a94d716

Please sign in to comment.