Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pages/ReportAddApproverPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ function ReportAddApproverPage({report, isLoadingReportData, policy}: ReportAddA
if (!email) {
return null;
}
const accountID = Number(policyMemberEmailsToAccountIDs[email] ?? CONST.DEFAULT_NUMBER_ID);
const isPendingDelete = employeeList?.[accountID]?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
const accountID = policyMemberEmailsToAccountIDs[email];
const isPendingDelete = employee?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;

// Filter the current report approver and members which are pending for deletion
if (report.managerID === accountID || isPendingDelete || !isAllowedToApproveExpenseReport(report, accountID, policy)) {
// Filter the current report approver, members which are pending for deletion, or members we cannot map to an account
if (!accountID || report.managerID === accountID || isPendingDelete || !isAllowedToApproveExpenseReport(report, accountID, policy)) {
return null;
}

Expand Down
Loading