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:
Wenjing Wang
2015-12-02 11:23:22 -08:00
committed by facebook-github-bot-0
parent 0779dd1e87
commit 0058b0806b

View File

@@ -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(