Skip to content

Commit

Permalink
don't used combinedReportActions actually
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkiWines committed Apr 2, 2024
1 parent df53dc9 commit 0d2a5aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,12 @@ function ReportActionsView({
// and we also generate a money request action if the number of money requests in reportActions is less than the total number of money requests
// to display at least one money request action to match the total data.
const reportActionsToDisplay = useMemo(() => {
if (!ReportUtils.isMoneyRequestReport(report) || !combinedReportActions.length) {
return combinedReportActions;
if (!ReportUtils.isMoneyRequestReport(report) || !reportActions.length) {
return reportActions;
}

const actions = [...combinedReportActions];
const lastAction = combinedReportActions[combinedReportActions.length - 1];
const actions = [...reportActions];
const lastAction = reportActions[reportActions.length - 1];

if (!ReportActionsUtils.isCreatedAction(lastAction)) {
const optimisticCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(String(report?.ownerAccountID), DateUtils.subtractMillisecondsFromDateTime(lastAction.created, 1));
Expand Down Expand Up @@ -528,7 +528,7 @@ function ReportActionsView({
}

return [...actions, createdAction];
}, [combinedReportActions, report, transactionThreadReport]);
}, [reportActions, report, transactionThreadReport]);

// Comments have not loaded at all yet do nothing
if (!reportActions.length) {
Expand Down

0 comments on commit 0d2a5aa

Please sign in to comment.