1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-29 04:17:41 +02:00

work: fallback value (#4429)

This commit is contained in:
Brandon Maharaj 2023-01-13 13:06:14 -05:00 committed by GitHub
parent 6bb55c7320
commit 3db82181ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {