mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 05:15:49 +08:00
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:
committed by
facebook-github-bot-6
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;
|
||||
|
||||
Reference in New Issue
Block a user