PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
875 stars 172 forks source link

Ensure that children exists #68

Closed alexpchin closed 3 years ago

alexpchin commented 3 years ago

In createCollapsibleTabs, we should ensure that children exists as this can be undefined:

Line 88:

const scrollY = useSharedValue([...new Array(children.length)].map(() => 0));

Line 106:

const [data] = React.useState(
  [...new Array(children.length)].map((_, i) => i)
)
alexpchin commented 3 years ago

Addressed in: https://github.com/PedroBern/react-native-collapsible-tab-view/pull/69