Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Screen loads twice when using TabNavigator
react-navigation#476
  • Loading branch information
mlazari committed Jan 10, 2018
1 parent 50d5c8b commit 29f0c1d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/routers/TabRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,13 @@ export default (
}
);
if (tabRouter && tabRouter.getActionForPathAndParams) {
action.action = tabRouter.getActionForPathAndParams(
parts.slice(1).join('/'),
params
);
const tabPath = parts.slice(1).join('/');
if (tabPath) {
action.action = tabRouter.getActionForPathAndParams(
tabPath,
params
);
}
} else if (params) {
action.params = params;
}
Expand Down

0 comments on commit 29f0c1d

Please sign in to comment.