Updated GetArrayValue to use same logic as optimised GetCollectionValue

This commit is contained in:
Chomp
2025-02-25 13:29:34 +00:00
parent 15f042435f
commit 8aebbcd395
+1 -9
View File
@@ -435,14 +435,6 @@ public class RandomUtil(ISptLogger<RandomUtil> _logger, ICloner _cloner)
public T? GetArrayValue<T>(IEnumerable<T> list)
{
var rand = new Random();
try
{
return list.ElementAt(rand.Next(0, list.Count()));
}
catch (Exception)
{
return default;
}
return GetCollectionValue(list);
}
}