Skip to content

Commit

Permalink
type error
Browse files Browse the repository at this point in the history
  • Loading branch information
grgia committed Oct 29, 2024
1 parent 67e7df3 commit b029e64
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8034,12 +8034,16 @@ function canLeaveChat(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boo
return (isChatThread(report) && !!getReportNotificationPreference(report)) || isUserCreatedPolicyRoom(report) || isNonAdminOrOwnerOfPolicyExpenseChat(report, policy);
}

function getReportActionActorAccountID(reportAction: OnyxInputOrEntry<ReportAction>, iouReport: OnyxInputOrEntry<Report> | undefined, isPolicyExpenseChat: boolean): number | undefined {
function getReportActionActorAccountID(
reportAction: OnyxInputOrEntry<ReportAction>,
iouReport: OnyxInputOrEntry<Report> | undefined,
isPolicyExpenseChatParam: boolean | undefined,
): number | undefined {
switch (reportAction?.actionName) {
case CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW: {
const ownerAccountID = iouReport?.ownerAccountID ?? reportAction?.childOwnerAccountID;
const actorAccountID = iouReport?.managerID ?? reportAction?.childManagerAccountID;
return isPolicyExpenseChat ? ownerAccountID : actorAccountID;
return isPolicyExpenseChatParam ? ownerAccountID : actorAccountID;
}

case CONST.REPORT.ACTIONS.TYPE.SUBMITTED:
Expand Down

0 comments on commit b029e64

Please sign in to comment.