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
  • Loading branch information
srikarparsi authored Jun 16, 2024
2 parents 75c104b + 35e875f commit 35e9d37
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 35e9d37

Please sign in to comment.