Skip to content

Commit

Permalink
revert dev logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Dec 5, 2024
1 parent 1673bc5 commit 7ba97ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6318,10 +6318,10 @@ function canAccessReport(report: OnyxEntry<Report>, policies: OnyxCollection<Pol
if (isDefaultRoom(report) && !canSeeDefaultRoom(report, policies, betas)) {
return false;
}
//! DEV
// if (report?.errorFields?.notFound) {
// return false;
// }

if (report?.errorFields?.notFound) {
return false;
}

return true;
}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ function ReportScreen({route, currentReportID = '', navigation}: ReportScreenPro
const isLinkedMessagePageReady = isLinkedMessageAvailable && (reportActions.length - indexOfLinkedMessage >= CONST.REPORT.MIN_INITIAL_REPORT_ACTION_COUNT || doesCreatedActionExists());

// If there's a non-404 error for the report we should show it instead of blocking the screen
//! DEV
const hasHelpfulErrors = false; // Object.keys(report?.errorFields ?? {}).some((key) => key !== 'notFound');
const hasHelpfulErrors = Object.keys(report?.errorFields ?? {}).some((key) => key !== 'notFound');
const shouldHideReport = !hasHelpfulErrors && !ReportUtils.canAccessReport(report, policies, betas);

const transactionThreadReportID = ReportActionsUtils.getOneTransactionThreadReportID(reportID ?? '', reportActions ?? [], isOffline);
Expand Down

0 comments on commit 7ba97ac

Please sign in to comment.