File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3495,16 +3495,14 @@ function navigateToMostRecentReport(currentReport: OnyxEntry<Report>) {
34953495
34963496 if ( lastAccessedReportID ) {
34973497 const lastAccessedReportRoute = ROUTES . REPORT_WITH_ID . getRoute ( lastAccessedReportID ) ;
3498+ const isChatThread = isChatThreadReportUtils ( currentReport ) ;
34983499
3499- if ( currentReport ?. reportID ) {
3500- const isChatThread = isChatThreadReportUtils ( currentReport ) ;
3501- if ( isChatThread ) {
3502- // Using requestAnimationFrame to wait for RHP modal dismissal before navigating, avoiding navigation stack issues on web/desktop.
3503- requestAnimationFrame ( ( ) => {
3504- Navigation . navigate ( lastAccessedReportRoute ) ;
3505- } ) ;
3506- return ;
3507- }
3500+ if ( isChatThread ) {
3501+ // Using requestAnimationFrame to wait for RHP modal dismissal before navigating, avoiding navigation stack issues on web/desktop.
3502+ requestAnimationFrame ( ( ) => {
3503+ Navigation . navigate ( lastAccessedReportRoute ) ;
3504+ } ) ;
3505+ return ;
35083506 }
35093507
35103508 Navigation . goBack ( lastAccessedReportRoute ) ;
You can’t perform that action at this time.
0 commit comments