From 59b72b4930526613898703ba5933a2521d31bac4 Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 5 May 2024 00:27:36 +0200 Subject: [PATCH] refactor --- ShockOsc/Services/Updater.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShockOsc/Services/Updater.cs b/ShockOsc/Services/Updater.cs index 2906ead..b1064db 100644 --- a/ShockOsc/Services/Updater.cs +++ b/ShockOsc/Services/Updater.cs @@ -133,9 +133,9 @@ await JsonSerializer.DeserializeAsync>( listOfValid.Add((release, version)); } - var newestPreRelease = listOfValid.OrderByDescending(x => x.Item2).FirstOrDefault(); + var newestPreRelease = listOfValid.OrderByDescending(x => x.Item2); - return newestPreRelease.Item1; + return newestPreRelease.FirstOrDefault().Item1; } private async Task GetLatestRelease()