1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-29 02:29:55 +03:00

Resolve build errors

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-06-08 22:32:13 +05:00
parent 4c31ebf826
commit 26d7777577
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
5 changed files with 21 additions and 12 deletions

View file

@ -89,6 +89,7 @@ public static class Extensions {
public static TResult? MaxOrDefault<TSource, TResult>(
this IEnumerable<TSource> source, Func<TSource, TResult> selector) {
return source.Any() ? source.Max(selector) : default;
var list = source.ToList();
return list.Any() ? list.Max(selector) : default;
}
}