From 7f3445c2d1c22270cf1a063486df5bc3d0b51e99 Mon Sep 17 00:00:00 2001 From: Gabriel Chagas Marques Date: Thu, 3 Jan 2019 20:26:56 -0300 Subject: [PATCH] Support prop-type removal transforms (#233) react-native-animatable wasn't working in production on projects using transform-react-remove-prop-types because the prop-types were getting removed and the Object.keys was being called with undefined. --- createAnimatableComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createAnimatableComponent.js b/createAnimatableComponent.js index d99357a..730d520 100644 --- a/createAnimatableComponent.js +++ b/createAnimatableComponent.js @@ -563,7 +563,7 @@ export default function createAnimatableComponent(WrappedComponent) { throw new Error('You cannot combine animation and transition props'); } const restProps = omit( - Object.keys(AnimatableComponent.propTypes), + ['animation', 'duration', 'direction', 'delay', 'easing', 'iterationCount', 'iterationDelay', 'onAnimationBegin', 'onAnimationEnd', 'onTransitionBegin', 'onTransitionEnd', 'style', 'transition', 'useNativeDriver'], this.props, );