diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-04 13:37:42 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-04 13:37:42 -0500 |
commit | ac6127c63e2978a5cf63ff4753991e5ab33db8c3 (patch) | |
tree | c0cba0bd5ea09c8b6eaf5913826065f4e55fc853 | |
parent | d0b66b13bd828f81048074f442653f5467b9b18f (diff) | |
download | SMAPI-ac6127c63e2978a5cf63ff4753991e5ab33db8c3.tar.gz SMAPI-ac6127c63e2978a5cf63ff4753991e5ab33db8c3.tar.bz2 SMAPI-ac6127c63e2978a5cf63ff4753991e5ab33db8c3.zip |
fix log parser error when mod names are duplicated
-rw-r--r-- | docs/release-notes.md | 1 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index fb056e79..e1c262be 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -8,6 +8,7 @@ * For the [log parser][]: * Fixed mod list not including all mods if at least one has no author name. * Fixed some log entries being incorrectly filtered. + * Fixed error when mods have duplicate names. * For SMAPI developers: * Internal changes to support the upcoming Stardew Valley 1.3 update. diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index f622ccc4..d2d8004e 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -26,7 +26,7 @@ smapi.logParser({ logStarted: new Date(@Json.Serialize(Model.ParsedLog?.Timestamp)), showPopup: @Json.Serialize(Model.ParsedLog == null), - showMods: @Json.Serialize(Model.ParsedLog?.Mods?.ToDictionary(p => GetSlug(p.Name), p => true), new JsonSerializerSettings { Formatting = Formatting.None }), + showMods: @Json.Serialize(Model.ParsedLog?.Mods?.Select(p => GetSlug(p.Name)).Distinct().ToDictionary(slug => slug, slug => true), new JsonSerializerSettings { Formatting = Formatting.None }), showLevels: { trace: false, debug: false, |