expo-router 2.0.14 → 2.0.15
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
4
4
|
"main": "src/index.tsx",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,10 +64,6 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@react-navigation/drawer": "^6.5.8",
|
|
66
66
|
"expo": "^49.0.0",
|
|
67
|
-
"expo-constants": "*",
|
|
68
|
-
"expo-linking": "*",
|
|
69
|
-
"expo-status-bar": "*",
|
|
70
|
-
"metro": "~0.76.7",
|
|
71
67
|
"react-native-gesture-handler": "*",
|
|
72
68
|
"react-native-reanimated": "*",
|
|
73
69
|
"react-native-safe-area-context": "*",
|
|
@@ -135,7 +135,7 @@ function rewriteNavigationStateToParams(
|
|
|
135
135
|
) {
|
|
136
136
|
if (!state) return params;
|
|
137
137
|
// We Should always have at least one route in the state
|
|
138
|
-
const lastRoute = state.routes.
|
|
138
|
+
const lastRoute = state.routes[state.routes.length - 1]!;
|
|
139
139
|
params.screen = lastRoute.name;
|
|
140
140
|
// Weirdly, this always needs to be an object. If it's undefined, it won't work.
|
|
141
141
|
params.params = lastRoute.params
|
|
@@ -167,7 +167,7 @@ function getNavigateReplaceAction(
|
|
|
167
167
|
lastNavigatorSupportingReplace: NavigationState = parentState
|
|
168
168
|
): NavigationAction {
|
|
169
169
|
// We should always have at least one route in the state
|
|
170
|
-
const route = state.routes.
|
|
170
|
+
const route = state.routes[state.routes.length - 1]!;
|
|
171
171
|
|
|
172
172
|
// Only these navigators support replace
|
|
173
173
|
if (parentState.type === "stack" || parentState.type === "tab") {
|