mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-28 12:25:21 +08:00
Fix _isRouteFocused so it takes a route and returns bool rather than fn
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user