mastermoo / react-native-action-button

customizable multi-action-button component for react-native
MIT License
2.52k stars 569 forks source link

fix(ActionButton.js): improving filter to catch childrens of ActionButton #373

Closed RobertDS07 closed 1 year ago

RobertDS07 commented 2 years ago

Improving filter because if children is rendering with a condition ex.:

{callcenter_phone ? (
        <ActionButton.Item
          onPress={handleOpenCall}
          buttonColor={childrenColor || theme.colors.primary}
        >
          <Icon name="phone" type="FontAwesome" />
        </ActionButton.Item>
) : null}

It pass in filter because typeof null is 'object'

This PR closes issue 366