Skip to content

Commit

Permalink
Merge pull request #52786 from twilight2294/patch-7
Browse files Browse the repository at this point in the history
Fix: Track Expense Options are still present in thread details after the expense is deleted
  • Loading branch information
carlosmiceli authored Nov 19, 2024
2 parents 3c906a1 + fabead6 commit d9a4cf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ function ReportDetailsPage({policies, report, route}: ReportDetailsPageProps) {
});
}

if (isTrackExpenseReport) {
if (isTrackExpenseReport && !isDeletedParentAction) {
const actionReportID = ReportUtils.getOriginalReportID(report.reportID, parentReportAction) ?? '0';
const whisperAction = ReportActionsUtils.getTrackExpenseActionableWhisper(iouTransactionID, moneyRequestReport?.reportID ?? '0');
const actionableWhisperReportActionID = whisperAction?.reportActionID ?? '0';
Expand Down Expand Up @@ -561,6 +561,7 @@ function ReportDetailsPage({policies, report, route}: ReportDetailsPageProps) {
iouTransactionID,
parentReportAction,
moneyRequestReport?.reportID,
isDeletedParentAction,
]);

const displayNamesWithTooltips = useMemo(() => {
Expand Down

0 comments on commit d9a4cf7

Please sign in to comment.