Skip to content

Commit 060160e

Browse files
authored
Merge pull request Expensify#44458 from Expensify/rodrigo-fix-hold-banner
Fix HOLD banner when deleting last expense on report
2 parents 833a42c + c8ed13f commit 060160e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libs/ReportUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6556,7 +6556,7 @@ function hasHeldExpenses(iouReportID?: string): boolean {
65566556
*/
65576557
function hasOnlyHeldExpenses(iouReportID: string, transactions?: OnyxCollection<Transaction>): boolean {
65586558
const reportTransactions = TransactionUtils.getAllReportTransactions(iouReportID, transactions);
6559-
return !reportTransactions.some((transaction) => !TransactionUtils.isOnHold(transaction));
6559+
return reportTransactions.length > 0 && !reportTransactions.some((transaction) => !TransactionUtils.isOnHold(transaction));
65606560
}
65616561

65626562
/**

0 commit comments

Comments
 (0)