From 3db82181aec7ace8f310c740a86e6e6a3a8e9bdf Mon Sep 17 00:00:00 2001 From: Brandon Maharaj Date: Fri, 13 Jan 2023 13:06:14 -0500 Subject: [PATCH] work: fallback value (#4429) --- .../organization-badge/organization-name-badge.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/vault/organization-badge/organization-name-badge.component.ts b/apps/web/src/app/vault/organization-badge/organization-name-badge.component.ts index e423a2cb8d..33c659be55 100644 --- a/apps/web/src/app/vault/organization-badge/organization-name-badge.component.ts +++ b/apps/web/src/app/vault/organization-badge/organization-name-badge.component.ts @@ -33,7 +33,8 @@ export class OrganizationNameBadgeComponent implements OnInit { if (this.isMe) { this.color = await this.avatarService.loadColorFromState(); if (this.color == null) { - const userName = await this.tokenService.getName(); + const userName = + (await this.tokenService.getName()) ?? (await this.tokenService.getEmail()); this.color = Utils.stringToColor(userName.toUpperCase()); } } else {