Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: fix user select display (#7635)

Liu Ji98f83537b084
diff --git a/frontend/src/components/v2/Select/UserSelect.vue b/frontend/src/components/v2/Select/UserSelect.vue
index d9daaf5029..2c23e7a849 100644
--- a/frontend/src/components/v2/Select/UserSelect.vue
+++ b/frontend/src/components/v2/Select/UserSelect.vue
@@ -230,12 +230,12 @@ const renderAvatar = (user: User) => {
const renderLabel = (option: SelectOption) => {
const { user } = option as UserSelectOption;
const avatar = renderAvatar(user);
- const title = h("span", {}, user.title);
- const email = h(
- "span",
- { class: "text-sm text-gray-400" },
- `(${user.email})`
- );
+ const children = [h("span", {}, user.title)];
+ if (user.name !== UNKNOWN_USER_NAME) {
+ children.push(
+ h("span", { class: "text-sm text-gray-400" }, `(${user.email})`)
+ );
+ }
return h(
"div",
{
@@ -248,7 +248,7 @@ const renderLabel = (option: SelectOption) => {
{
class: "flex flex-row justify-start items-center gap-x-0.5 truncate",
},
- [title, email]
+ children
),
]
);