Skip to content

Commit

Permalink
resolves issues when using stack and drawer navigators
Browse files Browse the repository at this point in the history
for more information see this: react-navigation/react-navigation#1919 (comment)
  • Loading branch information
dseipp committed Jan 27, 2018
1 parent 6e50cb1 commit 174da42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reducers/navigationState.js
Expand Up @@ -8,6 +8,8 @@ export default (state = null, action) => {
const {initialRoute, type} = action.payload;
const navigator = getNavigator(type);

let initialNavState = navigator.router.getStateForAction(NavigationActions.init());

// the tab navigator decides to put a bunch of child actions on this that we don't want, so truncate those
const actionForPath = navigator.router.getActionForPathAndParams(initialRoute);
delete actionForPath.action;
Expand Down

0 comments on commit 174da42

Please sign in to comment.