diff --git a/src/screens/Compose/index.tsx b/src/screens/Compose/index.tsx index abb56f77..351dddf5 100644 --- a/src/screens/Compose/index.tsx +++ b/src/screens/Compose/index.tsx @@ -7,7 +7,7 @@ import ComposeRoot from '@screens/Compose/Root' import { formatText } from '@screens/Compose/utils/processText' import { useQueryClient } from '@tanstack/react-query' import { handleError } from '@utils/api/helpers' -import { RootStackScreenProps, useNavState } from '@utils/navigation/navigators' +import { RootStackScreenProps } from '@utils/navigation/navigators' import { useInstanceQuery } from '@utils/queryHooks/instance' import { usePreferencesQuery } from '@utils/queryHooks/preferences' import { searchLocalStatus } from '@utils/queryHooks/search' @@ -360,10 +360,12 @@ const ScreenCompose: React.FC> = ({ break case 'conversation': case 'reply': - for (const navState of params.navigationState) { - navState && - navState[1].page !== 'Following' && - queryClient.invalidateQueries(navState) + if (params.navigationState) { + for (const navState of params.navigationState) { + navState && + navState[1].page !== 'Following' && + queryClient.invalidateQueries(navState) + } } break }