mirror of https://github.com/zulip/zulip.git
settings_users: Don't use `text()` with undefined value.
`text(undefined)` is a noop, and also isn't validly typed.
This commit is contained in:
parent
7fbdefcfc0
commit
0e3374dc1b
|
@ -440,7 +440,10 @@ export function update_user_data(user_id, new_data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_data.role !== undefined) {
|
if (new_data.role !== undefined) {
|
||||||
$user_row.find(".user_role").text(people.get_user_type(user_id));
|
const user_type = people.get_user_type(user_id);
|
||||||
|
if (user_type) {
|
||||||
|
$user_row.find(".user_role").text(user_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue