Skip to content

Commit

Permalink
Update RCTNavigator.m
Browse files Browse the repository at this point in the history
Summary:
Related to this issue
I created the PR.
Feel free to talk about it.

facebook#65 (comment)

Thanks
Closes facebook#1131
Github Author: Iragne <[email protected]>

Test Plan: Open NavigatorIOS example in UIExplorer, push recurse navigation several times. Press back and observe that it no longer breaks.
  • Loading branch information
Iragne committed May 5, 2015
1 parent 3ab4d32 commit 88715e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion React/Views/RCTNavigator.m
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ - (void)reactBridgeDidFinishTransaction
// --- previously caught up -------- ------- still caught up ----------
viewControllerCount == previousReactCount && currentReactCount == previousReactCount;

BOOL jsGettingtooSlow =
// --- previously not caught up -------- ------- no longer caught up ----------
viewControllerCount < previousReactCount && currentReactCount < previousReactCount;

BOOL reactPushOne = jsGettingAhead && currentReactCount == previousReactCount + 1;
BOOL reactPopN = jsGettingAhead && currentReactCount < previousReactCount;

Expand All @@ -471,7 +475,8 @@ - (void)reactBridgeDidFinishTransaction
if (!(jsGettingAhead ||
jsCatchingUp ||
jsMakingNoProgressButNeedsToCatchUp ||
jsMakingNoProgressAndDoesntNeedTo)) {
jsMakingNoProgressAndDoesntNeedTo ||
jsGettingtooSlow)) {
RCTLogError(@"JS has only made partial progress to catch up to UIKit");
}
if (currentReactCount > _currentViews.count) {
Expand Down

0 comments on commit 88715e5

Please sign in to comment.