Skip to content

Commit

Permalink
Merge pull request Expensify#33005 from Expensify/nikki-fix-workspace…
Browse files Browse the repository at this point in the history
…-icon

[CP Staging] Fix greyed out workspace icon for workspace distance requests
  • Loading branch information
Julesssss authored Dec 14, 2023
2 parents a64e3cd + 08a805b commit 8c7ebaf
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 8c7ebaf

Please sign in to comment.