diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index a71310119ab49..6f29382f25a8f 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -677,7 +677,7 @@ function clearSignInData() { */ function resetHomeRouteParams() { Navigation.isNavigationReady().then(() => { - const routes = navigationRef.current?.getState().routes; + const routes = navigationRef.current?.getState()?.routes; const homeRoute = routes?.find((route) => route.name === SCREENS.HOME); const emptyParams: Record = {}; diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index 6535d35c55f99..83cf5085aaba4 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -68,9 +68,6 @@ type ReportScreenOnyxProps = { /** The policies which the user has access to */ policies: OnyxCollection; - - /** The report metadata loading states */ - reportMetadata: OnyxEntry; }; type OnyxHOCProps = { @@ -110,22 +107,15 @@ function getParentReportAction(parentReportActions: OnyxEntry `${ONYXKEYS.COLLECTION.REPORT_METADATA}${getReportID(route)}`, - initialValue: { - isLoadingInitialReportActions: true, - isLoadingOlderReportActions: false, - hasLoadingOlderReportActionsError: false, - isLoadingNewerReportActions: false, - hasLoadingNewerReportActionsError: false, - }, - }, betas: { key: ONYXKEYS.BETAS, }, @@ -880,7 +861,6 @@ export default withCurrentReportID( ReportScreen, (prevProps, nextProps) => prevProps.isSidebarLoaded === nextProps.isSidebarLoaded && - lodashIsEqual(prevProps.reportMetadata, nextProps.reportMetadata) && lodashIsEqual(prevProps.betas, nextProps.betas) && lodashIsEqual(prevProps.policies, nextProps.policies) && prevProps.currentReportID === nextProps.currentReportID &&