From 14f12974b26b9e1865a3998e16416715c2be0b19 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 6 Feb 2024 21:42:02 +0800 Subject: [PATCH] update the condition --- src/libs/ReportUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 89c2b902b7fc..3a8c8b1625b2 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1238,7 +1238,7 @@ function canDeleteReportAction(reportAction: OnyxEntry, reportID: } if (isActionOwner) { - if (isPaidGroupPolicyExpenseReport(!isEmptyObject(report) ? report : null)) { + if (!isEmptyObject(report) && isPaidGroupPolicyExpenseReport(report)) { // If it's a paid policy expense report, only allow deleting the request if it's not submitted or the user is the policy admin return isDraftExpenseReport(report) || PolicyUtils.isPolicyAdmin(policy); }