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 3c8dee490f
commit 0f123b590b

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,