summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Controllers')
-rw-r--r--src/SMAPI.Web/Controllers/IndexController.cs2
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI.Web/Controllers/IndexController.cs b/src/SMAPI.Web/Controllers/IndexController.cs
index f2f4c342..5097997c 100644
--- a/src/SMAPI.Web/Controllers/IndexController.cs
+++ b/src/SMAPI.Web/Controllers/IndexController.cs
@@ -96,7 +96,7 @@ namespace StardewModdingAPI.Web.Controllers
{
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(release.Body);
- foreach (HtmlNode node in doc.DocumentNode.SelectNodes("//*[@class='noinclude']")?.ToArray() ?? new HtmlNode[0])
+ foreach (HtmlNode node in doc.DocumentNode.SelectNodes("//*[@class='noinclude']")?.ToArray() ?? Array.Empty<HtmlNode>())
node.Remove();
release.Body = doc.DocumentNode.InnerHtml.Trim();
}
diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs
index 37d763cc..dfe2504b 100644
--- a/src/SMAPI.Web/Controllers/ModsApiController.cs
+++ b/src/SMAPI.Web/Controllers/ModsApiController.cs
@@ -79,7 +79,7 @@ namespace StardewModdingAPI.Web.Controllers
public async Task<IEnumerable<ModEntryModel>> PostAsync([FromBody] ModSearchModel model, [FromRoute] string version)
{
if (model?.Mods == null)
- return new ModEntryModel[0];
+ return Array.Empty<ModEntryModel>();
ModUpdateCheckConfig config = this.Config.Value;