mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 08:30:34 +00:00
Fix Navigator jumpTo same route issue
Summary: https://github.com/facebook/react-native/pull/8071 introduced a bug where jumping to the same navigator route would show a blank screen since the `index` check is not catching cases where the `transitionQueue` is empty. Reviewed By: ericvicenti Differential Revision: D3464697 fbshipit-source-id: 494527d1fb0ac5aea394abd3231dd19c56596549
This commit is contained in:
parent
6668cd2129
commit
6982f5aa24
@ -373,9 +373,6 @@ var Navigator = React.createClass({
|
||||
},
|
||||
|
||||
_transitionTo: function(destIndex, velocity, jumpSpringTo, cb) {
|
||||
if (destIndex === this.state.presentedIndex && this.state.transitionQueue.length > 0) {
|
||||
return;
|
||||
}
|
||||
if (this.state.transitionFromIndex !== null) {
|
||||
this.state.transitionQueue.push({
|
||||
destIndex,
|
||||
@ -384,6 +381,9 @@ var Navigator = React.createClass({
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (destIndex === this.state.presentedIndex) {
|
||||
return;
|
||||
}
|
||||
this.state.transitionFromIndex = this.state.presentedIndex;
|
||||
this.state.presentedIndex = destIndex;
|
||||
this.state.transitionCb = cb;
|
||||
|
Loading…
x
Reference in New Issue
Block a user