From 67ed516e702d773f5eba5a1732e5a6f39ae9f56a Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 25 Sep 2023 22:18:12 +0700 Subject: [PATCH] Update src/pages/home/report/ReportActionItemSingle.js Co-authored-by: Joel Davies --- src/pages/home/report/ReportActionItemSingle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index a220f17d3e8b..3bf25aacc2f9 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -114,7 +114,7 @@ function ReportActionItemSingle(props) { let secondaryAvatar = {}; const primaryDisplayName = displayName; if (displayAllActors) { - // When we merge IOUs into one, if ownerAccountID is also actorAccountID, we should use managerID instead to prevent duplicate information. + // The ownerAccountID and actorAccountID can be the same if the a user requests money back from the IOU's original creator, in that case we need to use managerID to avoid displaying the same user twice const secondaryAccountId = props.iouReport.ownerAccountID === actorAccountID ? props.iouReport.managerID : props.iouReport.ownerAccountID; const secondaryUserDetails = props.personalDetailsList[secondaryAccountId] || {}; const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', '');