@react-navigation/core 8.0.0-alpha.32 → 8.0.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -695,7 +695,7 @@ const createNestedStateObject = (path, routes, initialRoutes, routeConfig) => {
|
|
|
695
695
|
while (nextRoute != null) {
|
|
696
696
|
route = nextRoute;
|
|
697
697
|
initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);
|
|
698
|
-
const nestedStateIndex = nestedState.index
|
|
698
|
+
const nestedStateIndex = nestedState.index ?? nestedState.routes.length - 1;
|
|
699
699
|
const nestedRoute = nestedState.routes[nestedStateIndex];
|
|
700
700
|
if (nestedRoute == null) {
|
|
701
701
|
throw new Error(`Couldn't find a route at index ${nestedStateIndex}.`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/core",
|
|
3
3
|
"description": "Core utilities for building navigators",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.33",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
7
7
|
"react-native",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
]
|
|
91
91
|
]
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "b480c645f83ee32b649ed398bb03c75576bf6547"
|
|
94
94
|
}
|
package/src/getStateFromPath.tsx
CHANGED
|
@@ -1089,7 +1089,7 @@ const createNestedStateObject = (
|
|
|
1089
1089
|
initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);
|
|
1090
1090
|
|
|
1091
1091
|
const nestedStateIndex =
|
|
1092
|
-
nestedState.index
|
|
1092
|
+
nestedState.index ?? nestedState.routes.length - 1;
|
|
1093
1093
|
const nestedRoute = nestedState.routes[nestedStateIndex];
|
|
1094
1094
|
|
|
1095
1095
|
if (nestedRoute == null) {
|