Skip to content

Commit 43cc28e

Browse files
olvipiOleksandr Pishchuk
andauthored
fix: [Android] fixed index with null child (#251)
Co-authored-by: Oleksandr Pishchuk <[email protected]>
1 parent c6addc2 commit 43cc28e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/PickerAndroid.android.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function PickerAndroid(props: PickerAndroidProps, ref: PickerRef): React.Node {
8585
// eslint-disable-next-line no-shadow
8686
let selected = 0;
8787
// eslint-disable-next-line no-shadow
88-
const items = React.Children.map(props.children, (child, index) => {
88+
const items = React.Children.toArray(props.children).map((child, index) => {
8989
if (child === null) {
9090
return null;
9191
}

0 commit comments

Comments
 (0)