Skip to content

Commit

Permalink
fix optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Dec 31, 2024
1 parent ad595ec commit 3c27b60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ReportAction>, reportID?: string): boolean {
function isThreadParentMessage(reportAction: OnyxEntry<ReportAction>, reportID: string | undefined): boolean {
const {childType, childVisibleActionCount = 0, childReportID} = reportAction ?? {};
return childType === CONST.REPORT.TYPE.CHAT && (childVisibleActionCount > 0 || String(childReportID) === reportID);
}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6409,7 +6409,7 @@ function isReportNotFound(report: OnyxEntry<Report>): 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<Report>, currentReportId?: string): boolean {
function shouldHideReport(report: OnyxEntry<Report>, currentReportId: string | undefined): boolean {
const currentReport = getReportOrDraftReport(currentReportId);
const parentReport = getParentReport(!isEmptyObject(currentReport) ? currentReport : undefined);
const reportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report?.reportID}`] ?? {};
Expand Down Expand Up @@ -6579,7 +6579,7 @@ function hasReportErrorsOtherThanFailedReceipt(report: Report, doesReportHaveVio

type ShouldReportBeInOptionListParams = {
report: OnyxEntry<Report>;
currentReportId?: string;
currentReportId: string | undefined;
isInFocusMode: boolean;
betas: OnyxEntry<Beta[]>;
policies: OnyxCollection<Policy>;
Expand Down

0 comments on commit 3c27b60

Please sign in to comment.