[MAdMan] Possibly fix "Cannot find breadcrumb interpolators for -1"

This commit is contained in:
Alex Kotliarskyi 2015-05-29 11:05:01 -07:00
parent 36c33b4a60
commit 228dc5f936
1 changed files with 8 additions and 5 deletions

View File

@ -549,11 +549,14 @@ var Navigator = React.createClass({
this.spring.getCurrentValue()
);
} else if (this.state.activeGesture != null) {
this._transitionBetween(
this.state.presentedIndex,
this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture),
this.spring.getCurrentValue()
);
var presentedToIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
if (presentedToIndex > -1) {
this._transitionBetween(
this.state.presentedIndex,
presentedToIndex,
this.spring.getCurrentValue()
);
}
}
},