From c12e9d788e71aaee155a4a055c08ccb88f0e8c21 Mon Sep 17 00:00:00 2001 From: atravita-mods <94934860+atravita-mods@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:24:07 -0400 Subject: as per comments, remove where in favor of nullchecking id instead --- src/SMAPI/Framework/ModLoading/ModResolver.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs index 40d8b3bc..37aceb1b 100644 --- a/src/SMAPI/Framework/ModLoading/ModResolver.cs +++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs @@ -178,10 +178,12 @@ namespace StardewModdingAPI.Framework.ModLoading string[] lateArray = modIdsToLoadLate.ToArray(); return mods - .Where(mod => mod.FailReason is not null) .OrderBy(mod => { - string id = mod.Manifest.UniqueID; + string? id = mod.Manifest?.UniqueID; + + if (id is null) + return 0; if (modIdsToLoadEarly.TryGetValue(id, out string? actualId)) return -int.MaxValue + Array.IndexOf(earlyArray, actualId); -- cgit