mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Potential fix for concurrent list modification error
This commit is contained in:
parent
17826246f2
commit
e7f95c9ba6
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
var roleIdCache = _roleIdsField.GetValue(member) as List<ulong>;
|
||||
var currentRoleIds = member.Roles.Where(x => x != null).Select(x => x.Id);
|
||||
var invalidRoleIds = roleIdCache.Where(x => !currentRoleIds.Contains(x));
|
||||
var invalidRoleIds = roleIdCache.Where(x => !currentRoleIds.Contains(x)).ToList();
|
||||
roleIdCache.RemoveAll(x => invalidRoleIds.Contains(x));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue