mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-07 09:17:55 +08:00
propTypes could be undefined
Summary: public This causes a warning since propType not exist Reviewed By: vjeux Differential Revision: D2713358 fb-gh-sync-id: 58406d1dc969e6f1d40bee958c28cc87036b30c2
This commit is contained in:
committed by
facebook-github-bot-0
parent
0779dd1e87
commit
0058b0806b
@@ -1094,6 +1094,10 @@ function createAnimatedComponent(Component: any): any {
|
||||
}
|
||||
AnimatedComponent.propTypes = {
|
||||
style: function(props, propName, componentName) {
|
||||
if (!Component.propTypes) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var key in ViewStylePropTypes) {
|
||||
if (!Component.propTypes[key] && props[key] !== undefined) {
|
||||
console.error(
|
||||
|
||||
Reference in New Issue
Block a user