Fixed showing realm roles (#3337)

This commit is contained in:
Erik Jan de Wit 2022-09-19 11:56:18 +02:00 committed by GitHub
parent 6300f13aa0
commit 49ffd816ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,13 +42,13 @@ export const Role = () => {
values.map((r) => adminClient.roles.findOneById({ id: r.id }))
);
return Promise.all(
roles
.filter((r) => r?.clientRole)
.map(async (role) => ({
roles.map(async (role) => ({
role: role!,
client: await adminClient.clients.findOne({
client: role!.clientRole
? await adminClient.clients.findOne({
id: role?.containerId!,
}),
})
: undefined,
}))
);
}