From 3c27b60e247112532cd49471adc8dec9b2e1d933 Mon Sep 17 00:00:00 2001 From: Julian Kobrynski Date: Tue, 31 Dec 2024 09:23:22 +0100 Subject: [PATCH] fix optional parameters --- src/libs/ReportActionsUtils.ts | 2 +- src/libs/ReportUtils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index f659f70f552e..c89d7b52b6df 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -347,7 +347,7 @@ function isInviteOrRemovedAction( /** * Returns whether the comment is a thread parent message/the first message in a thread */ -function isThreadParentMessage(reportAction: OnyxEntry, reportID?: string): boolean { +function isThreadParentMessage(reportAction: OnyxEntry, reportID: string | undefined): boolean { const {childType, childVisibleActionCount = 0, childReportID} = reportAction ?? {}; return childType === CONST.REPORT.TYPE.CHAT && (childVisibleActionCount > 0 || String(childReportID) === reportID); } diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index c27edf3d5bcb..5596fe905d9f 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6409,7 +6409,7 @@ function isReportNotFound(report: OnyxEntry): boolean { /** * Check if the report is the parent report of the currently viewed report or at least one child report has report action */ -function shouldHideReport(report: OnyxEntry, currentReportId?: string): boolean { +function shouldHideReport(report: OnyxEntry, currentReportId: string | undefined): boolean { const currentReport = getReportOrDraftReport(currentReportId); const parentReport = getParentReport(!isEmptyObject(currentReport) ? currentReport : undefined); const reportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report?.reportID}`] ?? {}; @@ -6579,7 +6579,7 @@ function hasReportErrorsOtherThanFailedReceipt(report: Report, doesReportHaveVio type ShouldReportBeInOptionListParams = { report: OnyxEntry; - currentReportId?: string; + currentReportId: string | undefined; isInFocusMode: boolean; betas: OnyxEntry; policies: OnyxCollection;