Skip to content

Commit

Permalink
Fix issue pushing a modal twice
Browse files Browse the repository at this point in the history
For some reason, when you open a screen in a modal StackNavigator, it
pushes twice.

I don't think this is the actual solution, but it does solve the problem
for me for now. I'll need more time to dig into this some more.

See this related issue for more: react-navigation#476 (comment)
  • Loading branch information
jsteiner committed Nov 5, 2017
1 parent ffb95fd commit 9e6d9f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routers/StackRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default (
routeToPush = initChildRoute;
} else if (navigatedChildRoute !== initChildRoute) {
// Push the route if the state has changed in response to this navigation
routeToPush = navigatedChildRoute;
routeToPush = initChildRoute;
}
if (routeToPush) {
return StateUtils.push(state, {
Expand Down

0 comments on commit 9e6d9f0

Please sign in to comment.