mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-26 00:50:56 -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);
|
const srv = client.servers.get(member._id.server);
|
||||||
if (srv?.roles) {
|
if (srv?.roles) {
|
||||||
for (const role of member.roles) {
|
for (const role of member.roles) {
|
||||||
const c = srv.roles[role].colour;
|
const c = srv.roles[role]?.colour;
|
||||||
if (c) {
|
if (c) {
|
||||||
color = c;
|
color = c;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue