Fix _isRouteFocused so it takes a route and returns bool rather than fn

This commit is contained in:
Brent Vatne 2018-04-20 16:39:03 +03:00
parent e5d8d2c216
commit e5e434c9e2

View File

@ -25,7 +25,7 @@ function createNavigator(NavigatorView, router, navigationConfig) {
Object.values(this.childEventSubscribers).map(s => s.removeAll());
}
_isRouteFocused = route => () => {
_isRouteFocused = route => {
const { state } = this.props.navigation;
const focusedRoute = state.routes[state.index];
return route === focusedRoute;