From f166627a8d14d4340bbeac3833680089f1338931 Mon Sep 17 00:00:00 2001 From: Volodymyr Kozieiev Date: Wed, 26 Jun 2019 11:47:59 +0300 Subject: [PATCH] First opened screen doesn't substitute default one --- index.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/index.js b/index.js index 2d0d2ca..27cbbd8 100644 --- a/index.js +++ b/index.js @@ -61,19 +61,6 @@ function createTwoPaneNavigator(routeConfigMap, navigationConfig) { const defaultGetStateForAction = router.getStateForAction; router.getStateForAction = (action: any, state: any) => { - - if (action.type === NavigationActions.NAVIGATE && - state.routes[state.index].routeName == navigationConfig.initialRouteName && - action.routeName in routeConfigMap) { - - const resetAction = StackActions.reset({ - index: 0, - actions: [NavigationActions.navigate({routeName: action.routeName, params: action.params})], - - }); - - return defaultGetStateForAction(resetAction, state); - } return defaultGetStateForAction(action, state); };