Bladeren bron

fix push promise rejection

Guy Carmeli 7 jaren geleden
bovenliggende
commit
47d0cb6f73

+ 2
- 1
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/Navigator.java Bestand weergeven

@@ -108,8 +108,9 @@ public class Navigator extends ParentController implements ModalListener {
108 108
         ViewController from = findControllerById(fromId);
109 109
         if (from != null) {
110 110
             from.performOnParentStack(stack -> ((StackController) stack).animatePush(viewController, listener));
111
+        } else {
112
+            listener.onError("Could not push component: " + viewController.getId() + ". Stack with id " + fromId + " was not found.");
111 113
         }
112
-        listener.onError("Could not push component: " + viewController.getId() + ". Stack with id " + fromId + " was not found.");
113 114
     }
114 115
 
115 116
     public void setStackRoot(String fromId, ViewController viewController, CommandListener listener) {