fix: don't assume roles exist when rendering

This commit is contained in:
Paul Makles 2022-01-04 13:35:55 +00:00
parent d328c9e61b
commit 3baf82ca94

View file

@ -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;