Skip initializing the gesture properties if no width or height are available

This commit is contained in:
Brent Vatne 2018-12-08 17:57:52 -08:00
parent e19582184f
commit d389b776ca
1 changed files with 8 additions and 0 deletions

View File

@ -470,6 +470,14 @@ class StackViewLayout extends React.Component {
return;
}
// We can't run the gesture if width or height layout is unavailable
if (
this.props.transitionProps.layout.width.__getValue() === 0 ||
this.props.transitionProps.layout.height.__getValue() === 0
) {
return;
}
if (this._isMotionVertical()) {
this._prepareGestureVertical();
} else {