Skip to content

Commit

Permalink
Support prop-type removal transforms (#233)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CareLuLu-Gabriel authored and oblador committed Jan 3, 2019
1 parent 49dc4dc commit 7f3445c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion createAnimatableComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down

0 comments on commit 7f3445c

Please sign in to comment.