Fix link crash (#9102)

* fix link crash

* fix link crash
This commit is contained in:
Samuel Newman
2025-09-29 22:14:13 +03:00
committed by GitHub
parent 22bb9c599f
commit 2b32fff1d0
+2 -2
View File
@@ -165,8 +165,8 @@ export function useLink({
if (isNative && screen !== 'NotFound') {
const state = navigation.getState()
// if screen is not in the current navigator, it means it's
// most likely a tab screen
if (!state.routeNames.includes(screen)) {
// most likely a tab screen. note: state can be undefined
if (!state?.routeNames.includes(screen)) {
const parent = navigation.getParent()
if (
parent &&