fix link crash
This commit is contained in:
@@ -165,8 +165,8 @@ export function useLink({
|
|||||||
if (isNative && screen !== 'NotFound') {
|
if (isNative && screen !== 'NotFound') {
|
||||||
const state = navigation.getState()
|
const state = navigation.getState()
|
||||||
// if screen is not in the current navigator, it means it's
|
// if screen is not in the current navigator, it means it's
|
||||||
// most likely a tab screen
|
// most likely a tab screen. note: state can be undefined
|
||||||
if (state && !state.routeNames.includes(screen)) {
|
if (!state?.routeNames.includes(screen)) {
|
||||||
const parent = navigation.getParent()
|
const parent = navigation.getParent()
|
||||||
if (
|
if (
|
||||||
parent &&
|
parent &&
|
||||||
|
|||||||
Reference in New Issue
Block a user