Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/33990: Not here page appear when refreshing #35210

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type {NavigationState, PartialState, RouterConfigOptions, StackNavigationState} from '@react-navigation/native';
import {StackRouter} from '@react-navigation/native';
import type {ParamListBase} from '@react-navigation/routers';
import CONST from '@src/CONST';
import NAVIGATORS from '@src/NAVIGATORS';
import SCREENS from '@src/SCREENS';
import type {ResponsiveStackNavigatorRouterOptions} from './types';
Expand All @@ -21,6 +22,14 @@ const getTopMostReportIDFromRHP = (state: State): string => {
}

const topmostRoute = state.routes.at(-1);
if (
DylanDylann marked this conversation as resolved.
Show resolved Hide resolved
DylanDylann marked this conversation as resolved.
Show resolved Hide resolved
topmostRoute?.params &&
'iouType' in topmostRoute.params &&
typeof topmostRoute.params.iouType === 'string' &&
(topmostRoute.params.iouType === CONST.IOU.TYPE.REQUEST || topmostRoute.params.iouType === CONST.IOU.TYPE.SEND || topmostRoute.params.iouType === CONST.IOU.TYPE.SPLIT)
) {
return '';
}

if (topmostRoute?.state) {
return getTopMostReportIDFromRHP(topmostRoute.state);
Expand Down
Loading