Fix back swipe opening the drawer after a cold-start deep link (#11065)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
+2
-5
@@ -30,7 +30,7 @@ import {
|
||||
} from '#/lib/hooks/useNotificationHandler'
|
||||
import {useWebScrollRestoration} from '#/lib/hooks/useWebScrollRestoration'
|
||||
import {useCallOnce} from '#/lib/once'
|
||||
import {buildStateObject} from '#/lib/routes/helpers'
|
||||
import {buildStateObject, getCurrentRoute} from '#/lib/routes/helpers'
|
||||
import {
|
||||
type AllNavigatorParams,
|
||||
type BottomTabNavigatorParams,
|
||||
@@ -783,10 +783,7 @@ const LINKING = {
|
||||
|
||||
getPathFromState(state: State) {
|
||||
// find the current node in the navigation tree
|
||||
let node = state.routes[state.index || 0]
|
||||
while (node.state?.routes && typeof node.state?.index === 'number') {
|
||||
node = node.state?.routes[node.state?.index]
|
||||
}
|
||||
const node = getCurrentRoute(state)
|
||||
|
||||
// build the path
|
||||
const route = router.matchName(node.name)
|
||||
|
||||
Reference in New Issue
Block a user