Fix crash caused by attempting to access properties on animatedStyle when no screen interpolator

https://github.com/react-navigation/react-navigation-stack/issues/64
This commit is contained in:
Brent Vatne 2018-11-30 12:40:12 -08:00
parent 1c32b935b8
commit 0e9dfcaeef
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,6 @@ function getAccessibilityProps(isActive) {
class Card extends React.Component {
render() {
const {
animatedStyle,
children,
pointerEvents,
style,
@ -42,6 +41,9 @@ class Card extends React.Component {
extrapolate: 'clamp',
});
// animatedStyle can be `false` if there is no screen interpolator
const animatedStyle = this.props.animatedStyle || {};
const {
shadowOpacity,
overlayOpacity,