From 0058b0806bf64f4f1c1277bca46198399b67c8ba Mon Sep 17 00:00:00 2001 From: Wenjing Wang Date: Wed, 2 Dec 2015 11:23:22 -0800 Subject: [PATCH] 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 --- Libraries/Animated/src/AnimatedImplementation.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js index b8b3aee77..3039f887b 100644 --- a/Libraries/Animated/src/AnimatedImplementation.js +++ b/Libraries/Animated/src/AnimatedImplementation.js @@ -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(