diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-02-08 18:07:38 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-02-08 18:07:38 -0500 |
commit | 5173ddf53571703c3895cd5f2d45891489d96ff9 (patch) | |
tree | aa9db274bd1f35001c78f2cb551dd4cc10547033 /src | |
parent | 67c52af72d6d0c4fddd3a07b159cb44b5c277599 (diff) | |
download | SMAPI-5173ddf53571703c3895cd5f2d45891489d96ff9.tar.gz SMAPI-5173ddf53571703c3895cd5f2d45891489d96ff9.tar.bz2 SMAPI-5173ddf53571703c3895cd5f2d45891489d96ff9.zip |
fix compat list error if mod has no name field due to wiki rendering issues
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI.Web/Controllers/ModsController.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI.Web/Controllers/ModsController.cs b/src/SMAPI.Web/Controllers/ModsController.cs index 24e36709..c62ed605 100644 --- a/src/SMAPI.Web/Controllers/ModsController.cs +++ b/src/SMAPI.Web/Controllers/ModsController.cs @@ -62,7 +62,7 @@ namespace StardewModdingAPI.Web.Controllers mods: this.Cache .GetWikiMods() .Select(mod => new ModModel(mod.Data)) - .OrderBy(p => Regex.Replace(p.Name.ToLower(), "[^a-z0-9]", "")), // ignore case, spaces, and special characters when sorting + .OrderBy(p => Regex.Replace((p.Name ?? "").ToLower(), "[^a-z0-9]", "")), // ignore case, spaces, and special characters when sorting lastUpdated: metadata.LastUpdated, isStale: this.Cache.IsStale(metadata.LastUpdated, this.StaleMinutes) ); |