Skip to content

Commit

Permalink
Humble Yuwen
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Jun 27, 2024
1 parent 594eb63 commit f4d8923
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
const styles = useThemeStyles();

// The app would crash due to subscribing to the entire report collection if parentReportID is an empty string. So we should have a fallback ID here.
const parentReportID = report.parentReportID ?? '-1';
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${parentReportID === '' ? parentReportID : report.parentReportID}`);
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID || '-1'}`);
const [sortedAllReportActions = []] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID ?? '-1'}`, {
canEvict: false,
selector: (allReportActions: OnyxEntry<OnyxTypes.ReportActions>) => ReportActionsUtils.getSortedReportActionsForDisplay(allReportActions, true),
Expand Down

0 comments on commit f4d8923

Please sign in to comment.