Skip to content

Commit

Permalink
fix(ListItem): Don't display empty rightTitle or rightSubtitle (#1398)
Browse files Browse the repository at this point in the history
Android crashes when use rightTitle

rightSubtitle test to display element. Instead we should make sure the
value of those props are cast to Booleans before we check

Closes #1391
  • Loading branch information
iRoachie committed Aug 30, 2018
1 parent b981220 commit ac80e47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/list/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const ListItem = props => {
])}
</View>
)}
{(rightTitle || rightSubtitle) && (
{(!!rightTitle || !!rightSubtitle) && (
<View
style={[styles.rightContentContainer, rightContentContainerStyle]}
>
Expand Down

0 comments on commit ac80e47

Please sign in to comment.