Skip to content

Commit 8747d85

Browse files
committed
refactor: reorder condition to fix ESLint prefer-nullish-coalescing error
1 parent ee2e71a commit 8747d85

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/libs/ReportSecondaryActionUtils.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,7 @@ function isUnapproveAction(report: Report, policy?: Policy): boolean {
224224
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
225225
const isManager = report.managerID === getCurrentUserAccountID();
226226

227-
if (isReportSettled || isPaymentProcessing) {
228-
return false;
229-
}
230-
231-
if (!isExpenseReport || !isReportApproved) {
227+
if (isReportSettled || !isExpenseReport || !isReportApproved || isPaymentProcessing) {
232228
return false;
233229
}
234230

0 commit comments

Comments
 (0)