ezqms-730: better check for roles when changing members (#5527)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2024-05-06 21:22:39 +04:00 committed by GitHub
parent 844e393460
commit 220f6eaeb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 6 deletions

View File

@ -242,8 +242,7 @@
if (removedMembersSet.size > 0 && rolesAssignment !== undefined) {
for (const [key, value] of Object.entries(rolesAssignment)) {
rolesAssignment[key as Ref<Role>] =
value !== undefined ? value.filter((m) => !removedMembersSet.has(m)) : undefined
rolesAssignment[key as Ref<Role>] = value != null ? value.filter((m) => !removedMembersSet.has(m)) : undefined
}
}

View File

@ -140,8 +140,7 @@
if (removedMembersSet.size > 0 && rolesAssignment !== undefined) {
for (const [key, value] of Object.entries(rolesAssignment)) {
rolesAssignment[key as Ref<Role>] =
value !== undefined ? value.filter((m) => !removedMembersSet.has(m)) : undefined
rolesAssignment[key as Ref<Role>] = value != null ? value.filter((m) => !removedMembersSet.has(m)) : undefined
}
}

View File

@ -302,8 +302,7 @@
if (removedMembersSet.size > 0 && rolesAssignment !== undefined) {
for (const [key, value] of Object.entries(rolesAssignment)) {
rolesAssignment[key as Ref<Role>] =
value !== undefined ? value.filter((m) => !removedMembersSet.has(m)) : undefined
rolesAssignment[key as Ref<Role>] = value != null ? value.filter((m) => !removedMembersSet.has(m)) : undefined
}
}