Skip to content

Commit

Permalink
Merge pull request #791 from vpasquier/master
Browse files Browse the repository at this point in the history
790: Avoid rightButtonImage or rightTitle warnings when set to null
  • Loading branch information
aksonov committed Jun 9, 2016
2 parents b43b714 + 31ad6f1 commit 0a16782
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ class NavBar extends React.Component {
</TouchableOpacity>
);
}
if ((!!state.onRight ^ !!(state.rightTitle || state.rightButtonImage))) {
if ((!!state.onRight ^ !!(typeof(state.rightTitle) !== 'undefined'
|| typeof(state.rightButtonImage) !== 'undefined'))) {
console.warn(
`Both onRight and rightTitle/rightButtonImage
must be specified for the scene: ${state.name}`
Expand Down

0 comments on commit 0a16782

Please sign in to comment.