Compare commits

..

No commits in common. "8774e302b23c5fe000ed1d69fe845e0c6be08113" and "9ea80671d361b19721861fbefb070fbd91ea9e25" have entirely different histories.

3 changed files with 3 additions and 27 deletions

View file

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>7.17.2</Version>
<Version>7.17.1</Version>
</PropertyGroup>
<PropertyGroup>

View file

@ -94,28 +94,4 @@ public static class Extension
{
return configType is EConfigType.Custom or EConfigType.PolicyGroup or EConfigType.ProxyChain;
}
/// <summary>
/// Safely adds elements from a collection to the list. Does nothing if the source is null.
/// </summary>
public static void AddRangeSafe<T>(this ICollection<T> destination, IEnumerable<T>? source)
{
ArgumentNullException.ThrowIfNull(destination);
if (source is null)
{
return;
}
if (destination is List<T> list)
{
list.AddRange(source);
return;
}
foreach (var item in source)
{
destination.Add(item);
}
}
}

View file

@ -218,8 +218,8 @@ public class ActionPrecheckManager
var childIds = new List<string>();
var subItems = await ProfileGroupItemManager.GetSubChildProfileItems(group);
childIds.AddRangeSafe(subItems.Select(p => p.IndexId));
childIds.AddRangeSafe(Utils.String2List(group.ChildItems));
childIds.AddRange(subItems.Select(p => p.IndexId));
childIds.AddRange(Utils.String2List(group.ChildItems));
foreach (var child in childIds)
{