forked from abner/for-legacy-web
fix: don't assume roles exist when rendering
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user