[ReactNative] Fix logic in popToRoute

This commit is contained in:
Eric Vicenti
2015-04-29 20:20:15 -07:00
parent eff7c8018c
commit 08ec846176

View File

@@ -1062,7 +1062,7 @@ var Navigator = React.createClass({
indexOfRoute !== -1,
'Calling pop to route for a route that doesn\'t exist!'
);
return this.state.routeStack.length - indexOfRoute - 1;
return this.state.presentedIndex - indexOfRoute;
},
popToRoute: function(route) {