Skip to content

Commit

Permalink
fix: empty title, message error of rn-actionsheet, close #1767
Browse files Browse the repository at this point in the history
  • Loading branch information
silentcloud committed Aug 31, 2017
1 parent 301ee79 commit ea88b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/action-sheet/AndroidContainer.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ActionSheetAndroid extends React.Component<IActionSheetNativeProps, any> {
title, message, options, destructiveButtonIndex, cancelButtonIndex,
} = config;

const titleMsg = title && (
const titleMsg = !!title && (
<View style={styles.title} key="0">
<Text style={styles.titleText}>{title}</Text>
</View>
Expand Down Expand Up @@ -71,7 +71,7 @@ class ActionSheetAndroid extends React.Component<IActionSheetNativeProps, any> {
>
<View>
{titleMsg}
{message && <View style={styles.message} key="1"><Text>{message}</Text></View>}
{!!message && <View style={styles.message} key="1"><Text>{message}</Text></View>}
<View>{content}</View>
</View>
</Modal>
Expand Down

0 comments on commit ea88b70

Please sign in to comment.