Explorar el Código

fixed android getLaunchArgs

Daniel Zlotin hace 6 años
padre
commit
0f2ade7f77

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationCommandsHandler.java Ver fichero

@@ -549,6 +549,6 @@ public class NavigationCommandsHandler {
549 549
 
550 550
     public static void getLaunchArgs(Promise promise) {
551 551
         Bundle bundle = LaunchArgs.instance.get();
552
-        promise.resolve(bundle);
552
+        promise.resolve(Arguments.fromBundle(bundle));
553 553
     }
554 554
 }

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/react/LaunchArgs.java Ver fichero

@@ -10,7 +10,7 @@ public enum LaunchArgs {
10 10
     private Bundle launchArgs;
11 11
 
12 12
     public void set(Intent intent) {
13
-        if (intent != null && intent.getExtras() != null && launchArgs != null) {
13
+        if (intent != null && intent.getExtras() != null && launchArgs == null) {
14 14
             this.launchArgs = intent.getExtras();
15 15
         }
16 16
     }