mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Added tests for null list in Min/Max or Default
This commit is contained in:
parent
a42d90f22c
commit
a087c89903
2 changed files with 30 additions and 1 deletions
|
@ -55,6 +55,9 @@ namespace NzbDrone.Core
|
|||
|
||||
public static int MaxOrDefault(this IEnumerable<int> ints)
|
||||
{
|
||||
if (ints == null)
|
||||
return 0;
|
||||
|
||||
var intList = ints.ToList();
|
||||
|
||||
if (!intList.Any())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue