@@ -42,14 +42,11 @@
class="tw-flex tw-items-center tw-py-1 tw-px-4 tw-leading-tight tw-text-info"
appStopProp
>
-
+
{{ "loggedInAs" | i18n }}
- {{ account.name }}
+ {{ account | userName }}
diff --git a/libs/angular/src/pipes/user-name.pipe.ts b/libs/angular/src/pipes/user-name.pipe.ts
index 22c214e41e..88b088a7e2 100644
--- a/libs/angular/src/pipes/user-name.pipe.ts
+++ b/libs/angular/src/pipes/user-name.pipe.ts
@@ -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;
}
}