From e8b05c4bd285e18915f99b6373524599a5c7bbdd Mon Sep 17 00:00:00 2001 From: Jules Date: Thu, 14 Dec 2023 12:07:35 +0000 Subject: [PATCH] Merge pull request #33005 from Expensify/nikki-fix-workspace-icon [CP Staging] Fix greyed out workspace icon for workspace distance requests (cherry picked from commit 8c7ebaf0f249dd94d57d434a5ed1212a0c211f93) --- src/libs/ReportUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 63037416c923..8729bb1bf957 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1211,7 +1211,8 @@ function getDefaultWorkspaceAvatar(workspaceName?: string): React.FC { function getWorkspaceAvatar(report: OnyxEntry): 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); } /**