From 3d0671d4e9437af4145f76a6cc4acd01cb2b88f7 Mon Sep 17 00:00:00 2001 From: Pavlo Aksonov Date: Wed, 25 Nov 2015 16:46:05 +0100 Subject: [PATCH] fix currentRoute for pop --- package.json | 2 +- reducer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ecb62dc..03049be 100644 --- a/package.json +++ b/package.json @@ -42,5 +42,5 @@ ], "name": "react-native-redux-router", "optionalDependencies": {}, - "version": "1.0.3" + "version": "1.0.4" } diff --git a/reducer.js b/reducer.js index 46777b9..ed09b15 100644 --- a/reducer.js +++ b/reducer.js @@ -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) {