[fix] PickerItem cyclic dependency

Close #1270
This commit is contained in:
Wyatt Greenway
2019-03-03 13:15:11 -07:00
committed by Nicolas Gallagher
parent 0c08ba3a7d
commit 421cb095f7
@@ -9,13 +9,13 @@
*/ */
import React from 'react'; import React from 'react';
import Picker from './'; import PickerItem from './PickerItem';
const PickerItemPropType = (props: Object, propName: string, componentName: string) => { const PickerItemPropType = (props: Object, propName: string, componentName: string) => {
const prop = props[propName]; const prop = props[propName];
let error = null; let error = null;
React.Children.forEach(prop, function(child) { React.Children.forEach(prop, function(child) {
if (child.type !== Picker.Item) { if (child.type !== PickerItem) {
error = new Error('`Picker` children must be of type `Picker.Item`.'); error = new Error('`Picker` children must be of type `Picker.Item`.');
} }
}); });