Fix crash when touch terminates without active gesture
Summary: When the touch gets terminated, it is not guaranteed that there is an active gesture. It looks like this was causing crashes @public Reviewed By: @chaceliang Differential Revision: D2441469
This commit is contained in:
parent
4dca06b238
commit
c962251900
|
@ -690,6 +690,9 @@ var Navigator = React.createClass({
|
|||
},
|
||||
|
||||
_handlePanResponderTerminate: function(e, gestureState) {
|
||||
if (this.state.activeGesture == null) {
|
||||
return;
|
||||
}
|
||||
var destIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
|
||||
this._detachGesture();
|
||||
var transitionBackToPresentedIndex = this.state.presentedIndex;
|
||||
|
|
Loading…
Reference in New Issue