Skip to content

Commit

Permalink
fix: [Android] fixed index with null child (#251)
Browse files Browse the repository at this point in the history
Co-authored-by: Oleksandr Pishchuk <opishchuk@deloitte.com>
  • Loading branch information
olvipi and Oleksandr Pishchuk authored May 22, 2021
1 parent c6addc2 commit 43cc28e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/PickerAndroid.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function PickerAndroid(props: PickerAndroidProps, ref: PickerRef): React.Node {
// eslint-disable-next-line no-shadow
let selected = 0;
// eslint-disable-next-line no-shadow
const items = React.Children.map(props.children, (child, index) => {
const items = React.Children.toArray(props.children).map((child, index) => {
if (child === null) {
return null;
}
Expand Down

0 comments on commit 43cc28e

Please sign in to comment.