Skip to content

Commit

Permalink
Merge pull request #43817 from Expensify/vit-43800
Browse files Browse the repository at this point in the history
[CP Staging] Check for -1 default value for delegateAccountID

(cherry picked from commit 35e9d37)
  • Loading branch information
srikarparsi authored and OSBotify committed Jun 17, 2024
1 parent 8f29d79 commit 7e877a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function BaseUserDetailsTooltip({accountID, fallbackUserDetails, icon, delegateA

// We replace the actor's email, name, and avatar with the Copilot manually for now. This will be improved upon when
// the Copilot feature is implemented.
if (delegateAccountID) {
if (delegateAccountID && delegateAccountID > 0) {
const delegateUserDetails = personalDetails?.[delegateAccountID];
const delegateUserDisplayName = ReportUtils.getUserDetailTooltipText(delegateAccountID);
userDisplayName = `${delegateUserDisplayName} (${translate('reportAction.asCopilot')} ${userDisplayName})`;
Expand Down

0 comments on commit 7e877a5

Please sign in to comment.