From aeca48c4190afaf64191253446a869019f4557f5 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 19 Nov 2018 19:22:55 -0500 Subject: [PATCH] fix beta header shown on compat list when there's no current beta --- docs/release-notes.md | 4 ++++ .../Framework/Clients/Wiki/WikiClient.cs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/docs/release-notes.md b/docs/release-notes.md index 90986cd4..9307bf35 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,4 +1,8 @@ # Release notes +## Upcoming +* For the web UI: + * Fixed compatibility list showing beta header when there's no beta in progress. + ## 2.8.2 * Fixed game crash in MacOS since SMAPI 2.8. diff --git a/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs b/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs index 7197bf2c..a881e8b7 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs @@ -52,6 +52,8 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki // fetch game versions string stableVersion = doc.DocumentNode.SelectSingleNode("div[@class='game-stable-version']")?.InnerText; string betaVersion = doc.DocumentNode.SelectSingleNode("div[@class='game-beta-version']")?.InnerText; + if (betaVersion == stableVersion) + betaVersion = null; // find mod entries HtmlNodeCollection modNodes = doc.DocumentNode.SelectNodes("table[@id='mod-list']//tr[@class='mod']");