Fix ViewPager warning
Differential Revision: D2620741 fb-gh-sync-id: 9f35e94efb25c689661bf2775a7d0624b3c586f4
This commit is contained in:
parent
11df4cb08c
commit
e3b6104810
|
@ -125,7 +125,10 @@ var ViewPagerAndroid = React.createClass({
|
|||
}],
|
||||
collapsable: false,
|
||||
};
|
||||
if (child.type && child.type.displayName && (child.type.displayName !== 'View')) {
|
||||
if (child.type &&
|
||||
child.type.displayName &&
|
||||
(child.type.displayName !== 'RCTView') &&
|
||||
(child.type.displayName !== 'View')) {
|
||||
console.warn('Each ViewPager child must be a <View>. Was ' + child.type.displayName);
|
||||
}
|
||||
return ReactElement.createElement(child.type, newProps);
|
||||
|
|
Loading…
Reference in New Issue