mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +00:00
[SM-590] show email as fallback name in SM header (#4957)
* show email if name is falsy * update and use user-name pipe
This commit is contained in:
@@ -2,7 +2,7 @@ import { Pipe, PipeTransform } from "@angular/core";
|
||||
|
||||
interface User {
|
||||
name?: string;
|
||||
email: string;
|
||||
email?: string;
|
||||
}
|
||||
|
||||
@Pipe({
|
||||
@@ -14,6 +14,10 @@ export class UserNamePipe implements PipeTransform {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (user.name == null && user.email == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return user.name == null || user.name.trim() === "" ? user.email : user.name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user