Skip to content

Commit

Permalink
Merge pull request #33005 from Expensify/nikki-fix-workspace-icon
Browse files Browse the repository at this point in the history
[CP Staging] Fix greyed out workspace icon for workspace distance requests

(cherry picked from commit 8c7ebaf)
  • Loading branch information
Julesssss authored and OSBotify committed Dec 14, 2023
1 parent 6cc449e commit e8b05c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,8 @@ function getDefaultWorkspaceAvatar(workspaceName?: string): React.FC<SvgProps> {

function getWorkspaceAvatar(report: OnyxEntry<Report>): UserUtils.AvatarSource {
const workspaceName = getPolicyName(report, false, allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]);
return allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar ?? getDefaultWorkspaceAvatar(workspaceName);
const avatar = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar ?? '';
return !isEmpty(avatar) ? avatar : getDefaultWorkspaceAvatar(workspaceName);
}

/**
Expand Down

0 comments on commit e8b05c4

Please sign in to comment.