Skip to content

Commit

Permalink
a little refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
M00rish committed Oct 5, 2024
1 parent e48be42 commit 4ffb8d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6918,9 +6918,9 @@ function canApproveIOU(iouReport: OnyxTypes.OnyxInputOrEntry<OnyxTypes.Report>,
const iouSettled = ReportUtils.isSettled(iouReport?.reportID);
const reportNameValuePairs = ReportUtils.getReportNameValuePairs(iouReport?.reportID);
const isArchivedReport = ReportUtils.isArchivedRoom(iouReport, reportNameValuePairs);
const unheldTotalIsZero = iouReport?.unheldTotal === 0;
const unheldTotalIsZero = iouReport && iouReport.unheldTotal === 0;

return isCurrentUserManager && !isOpenExpenseReport && !isApproved && !iouSettled && !isArchivedReport && !unheldTotalIsZero && iouReport != null;
return isCurrentUserManager && !isOpenExpenseReport && !isApproved && !iouSettled && !isArchivedReport && !unheldTotalIsZero;
}

function canIOUBePaid(
Expand Down

0 comments on commit 4ffb8d3

Please sign in to comment.