Skip to content

Commit

Permalink
fix not here page appear when refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanDylann committed Jan 25, 2024
1 parent 8cc80e6 commit fd58bf1
Showing 1 changed file with 9 additions and 0 deletions.
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 (
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

0 comments on commit fd58bf1

Please sign in to comment.