Skip to content

Commit 3d0671d

Browse files
Pavlo AksonovPavlo Aksonov
Pavlo Aksonov
authored and
Pavlo Aksonov
committed
fix currentRoute for pop
1 parent b55ead3 commit 3d0671d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
],
4343
"name": "react-native-redux-router",
4444
"optionalDependencies": {},
45-
"version": "1.0.3"
45+
"version": "1.0.4"
4646
}

reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function reducer(state = { routes: [], currentRoute: null}, actio
3939
return {
4040
mode: POP,
4141
routes: [...state.routes.slice(0, state.routes.length - num)],
42-
currentRoute: state.routes[state.routes[state.routes.length - num - 1]]
42+
currentRoute: state.routes[state.routes.length - num - 1]
4343
};
4444
case DISMISS:
4545
if (state.routes.length <= 1) {

0 commit comments

Comments
 (0)