Skip to content

Commit

Permalink
fix currentRoute for pop
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavlo Aksonov authored and Pavlo Aksonov committed Nov 25, 2015
1 parent b55ead3 commit 3d0671d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
],
"name": "react-native-redux-router",
"optionalDependencies": {},
"version": "1.0.3"
"version": "1.0.4"
}
2 changes: 1 addition & 1 deletion reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function reducer(state = { routes: [], currentRoute: null}, actio
return {
mode: POP,
routes: [...state.routes.slice(0, state.routes.length - num)],
currentRoute: state.routes[state.routes[state.routes.length - num - 1]]
currentRoute: state.routes[state.routes.length - num - 1]
};
case DISMISS:
if (state.routes.length <= 1) {
Expand Down

0 comments on commit 3d0671d

Please sign in to comment.