Skip to content

Commit

Permalink
Update src/pages/home/ReportScreen.js
Browse files Browse the repository at this point in the history
Co-authored-by: Fedi Rajhi <[email protected]>
  • Loading branch information
ospfranco and fedirjh authored Oct 2, 2023
1 parent ee43f7e commit e841dd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ function ReportScreen({
// It possible that we may not have the report object yet in Onyx yet e.g. we navigated to a URL for an accessible report that
// is not stored locally yet. If report.reportID exists, then the report has been stored locally and nothing more needs to be done.
// If it doesn't exist, then we fetch the report from the API.
if (report.reportID && report.reportID === getReportID(route) && !_.isEmpty(reportActions)) {
if (report.reportID && report.reportID === getReportID(route) && !isLoadingInitialReportActions) {
return;
}

Report.openReport(reportIDFromPath);
}, [report.reportID, route]);
}, [report.reportID, route, isLoadingInitialReportActions]);

const dismissBanner = useCallback(() => {
setIsBannerVisible(false);
Expand Down

0 comments on commit e841dd0

Please sign in to comment.