From a3ddc67eb3dfa1d61b5eaee7839e25b565b6b536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Tue, 7 Nov 2023 09:29:42 +0100 Subject: [PATCH] Fix display name computation in team member list When adding a new member to a team, the team member list is rendered several times before settling. The user attributes are missing on the first render, so take that into account in the display name computation. --- src/components/RoleMembers.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/RoleMembers.vue b/src/components/RoleMembers.vue index dcb505ae7..550f068c7 100644 --- a/src/components/RoleMembers.vue +++ b/src/components/RoleMembers.vue @@ -4,7 +4,7 @@
- {{ member.displayName || firstPartOfEmail(member.id) }} + {{ displayName(member) }}
@@ -33,8 +33,8 @@ export default { }, methods: { - firstPartOfEmail(email) { - return email.replace(/@.*/, ''); + displayName(member) { + return member.displayName || member.id?.replace(/@.*/, '') || ''; }, openProfileModal(profileId) {