From d076740675b60aea7def5aaefc54435216a3eb5c Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 17 May 2023 08:54:16 +0800 Subject: [PATCH] Fix issue that caused movie years to reset to 1 --- TVRename/Utility/Extensions/EnumerableExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TVRename/Utility/Extensions/EnumerableExtensions.cs b/TVRename/Utility/Extensions/EnumerableExtensions.cs index b55b2f9c..6f587d55 100644 --- a/TVRename/Utility/Extensions/EnumerableExtensions.cs +++ b/TVRename/Utility/Extensions/EnumerableExtensions.cs @@ -69,10 +69,10 @@ public static int MinOrDefault(this IEnumerable enumeration, Func return enumerable.Any() ? enumerable.Min(selector) : defaultValue; } - public static TProp? MinOrNull(this IEnumerable @this, Func selector) + public static TProp? MinOrNull(this IEnumerable @this, Func selector) where TProp : struct { IEnumerable list = @this.ToList(); - return list.Any() ? list.Min(selector) : default; + return list.Any() ? list.Min(selector) : null; } }