mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-09 16:53:36 -05:00
fix: don't assume roles exist when rendering
This commit is contained in:
parent
d328c9e61b
commit
3baf82ca94
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ export const Username = observer(
|
|||
const srv = client.servers.get(member._id.server);
|
||||
if (srv?.roles) {
|
||||
for (const role of member.roles) {
|
||||
const c = srv.roles[role].colour;
|
||||
const c = srv.roles[role]?.colour;
|
||||
if (c) {
|
||||
color = c;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue