Skip to content

Commit

Permalink
update the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Feb 6, 2024
1 parent c5b0efe commit 14f1297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ function canDeleteReportAction(reportAction: OnyxEntry<ReportAction>, 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);
}
Expand Down

0 comments on commit 14f1297

Please sign in to comment.