Skip to content

Commit

Permalink
[RNMobile] Fix crash once adding Group (#19457)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak committed Jan 10, 2020
1 parent 1e9f80c commit ec2d006
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/button/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ export function Button( props ) {
)
);

const newIcon = cloneElement( ( icon && <Icon icon={ icon } size={ iconSize } /> ),
{ colorScheme: props.preferredColorScheme, isPressed } );
const newIcon = icon ? cloneElement( ( <Icon icon={ icon } size={ iconSize } /> ),
{ colorScheme: props.preferredColorScheme, isPressed } ) : null;

const element = (
<TouchableOpacity
Expand Down

0 comments on commit ec2d006

Please sign in to comment.