diff options
author | atravita-mods <94934860+atravita-mods@users.noreply.github.com> | 2023-03-23 22:24:07 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2023-04-02 15:37:40 -0400 |
commit | c12e9d788e71aaee155a4a055c08ccb88f0e8c21 (patch) | |
tree | 6a078f1b19be2ad0b50df1e44e24bb616c895cfc | |
parent | 58ccaf9a1e3a9e374f07f23b5c3043dd3c0566ba (diff) | |
download | SMAPI-c12e9d788e71aaee155a4a055c08ccb88f0e8c21.tar.gz SMAPI-c12e9d788e71aaee155a4a055c08ccb88f0e8c21.tar.bz2 SMAPI-c12e9d788e71aaee155a4a055c08ccb88f0e8c21.zip |
as per comments, remove where in favor of nullchecking id instead
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModResolver.cs | 6 |
1 files 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); |