Fix ViewPager warning

Differential Revision: D2620741

fb-gh-sync-id: 9f35e94efb25c689661bf2775a7d0624b3c586f4
This commit is contained in:
Andrei Coman 2015-11-05 04:51:12 -08:00 committed by facebook-github-bot-7
parent 11df4cb08c
commit e3b6104810
1 changed files with 4 additions and 1 deletions

View File

@ -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);