mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
Fix ViewPager warning
Differential Revision: D2620741 fb-gh-sync-id: 9f35e94efb25c689661bf2775a7d0624b3c586f4
This commit is contained in:
committed by
facebook-github-bot-7
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);
|
||||
|
||||
Reference in New Issue
Block a user