Skip to content

Commit

Permalink
Merge pull request #52815 from bernhardoj/fix/52204-multiple-open-rep…
Browse files Browse the repository at this point in the history
…ort-calls

Fix not found page shows when open a new thread
  • Loading branch information
aldo-expensify authored Nov 21, 2024
2 parents 075d46b + 9e23e28 commit 85d8b88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function ReportScreen({route, currentReportID = '', navigation}: ReportScreenPro
return;
}

if (!shouldFetchReport(report) && (isInitialPageReady || isLinkedMessagePageReady)) {
if (!shouldFetchReport(report)) {
return;
}
// When creating an optimistic report that already exists, we need to skip openReport
Expand All @@ -458,7 +458,7 @@ function ReportScreen({route, currentReportID = '', navigation}: ReportScreenPro
}

fetchReport();
}, [report, fetchReport, reportIDFromRoute, isLoadingApp, isInitialPageReady, isLinkedMessagePageReady]);
}, [report, fetchReport, reportIDFromRoute, isLoadingApp]);

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

0 comments on commit 85d8b88

Please sign in to comment.