diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 779c2a8d2602..ace8f547b75c 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4681,7 +4681,7 @@ function buildOptimisticGroupChatReport( undefined, undefined, notificationPreference, - '-1', + undefined, undefined, undefined, avatarUri, diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index b48d24d6d67d..284004bc29ca 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -84,11 +84,12 @@ 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. - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID || '-1'}`); - const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID ?? -1}`); - const [parentReportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.parentReportID ?? -1}`); + const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID || '-1'}`); + const [parentReportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.parentReportID || '-1'}`); const {reportActions} = usePaginatedReportActions(report.reportID || '-1'); + /* eslint-enable @typescript-eslint/prefer-nullish-coalescing */ const transactionThreadReportID = useMemo( () => ReportActionsUtils.getOneTransactionThreadReportID(report.reportID, reportActions ?? [], isOffline),