Skip to content

Commit

Permalink
Solved a small bug when passing a right element into the route mapper…
Browse files Browse the repository at this point in the history
… and already has an initial component
  • Loading branch information
alvaromb committed Nov 16, 2015
1 parent 35f0567 commit 67b779c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/RouteMapper.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ export function leftButtonRouteMapperGenerator (BackComponent, styles, tintColor
export function rightButtonRouteMapperGenerator (RightComponent, topNavigator) {
return {
RightButton: (route, navigator, index, navState) => {
if (RightComponent) {
if (RightComponent && !route.rightElement) {
return <RightComponent navigator={navigator} topNavigator={topNavigator} />
}
return route.rightElement
if (route.rightElement) {
return route.rightElement
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-navigator-wrapper",
"version": "0.0.3",
"version": "0.0.4",
"description": "A React Native Navigator component wrapper that implements nested navigators for both push and modal transitions.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 67b779c

Please sign in to comment.