mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
work: fallback value (#4429)
This commit is contained in:
@@ -33,7 +33,8 @@ export class OrganizationNameBadgeComponent implements OnInit {
|
|||||||
if (this.isMe) {
|
if (this.isMe) {
|
||||||
this.color = await this.avatarService.loadColorFromState();
|
this.color = await this.avatarService.loadColorFromState();
|
||||||
if (this.color == null) {
|
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());
|
this.color = Utils.stringToColor(userName.toUpperCase());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user