Skip to content

Commit 6982f5a

Browse files
fred2028Facebook Github Bot 4
authored andcommitted
Fix Navigator jumpTo same route issue
Summary: facebook#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
1 parent 6668cd2 commit 6982f5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Libraries/CustomComponents/Navigator/Navigator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,6 @@ var Navigator = React.createClass({
373373
},
374374

375375
_transitionTo: function(destIndex, velocity, jumpSpringTo, cb) {
376-
if (destIndex === this.state.presentedIndex && this.state.transitionQueue.length > 0) {
377-
return;
378-
}
379376
if (this.state.transitionFromIndex !== null) {
380377
this.state.transitionQueue.push({
381378
destIndex,
@@ -384,6 +381,9 @@ var Navigator = React.createClass({
384381
});
385382
return;
386383
}
384+
if (destIndex === this.state.presentedIndex) {
385+
return;
386+
}
387387
this.state.transitionFromIndex = this.state.presentedIndex;
388388
this.state.presentedIndex = destIndex;
389389
this.state.transitionCb = cb;

0 commit comments

Comments
 (0)