add even more optional chaining to link thing

This commit is contained in:
Samuel Newman
2025-11-04 16:40:38 +02:00
parent 1b0fbd503e
commit 97b6ce6129
+1 -1
View File
@@ -166,7 +166,7 @@ export function useLink({
const state = navigation.getState()
// if screen is not in the current navigator, it means it's
// most likely a tab screen. note: state can be undefined
if (!state?.routeNames.includes(screen)) {
if (!state?.routeNames?.includes?.(screen)) {
const parent = navigation.getParent()
if (
parent &&