From 7720e5e84f66a7a8caa66b9fff26be68a1586fc5 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Tue, 24 Jan 2023 14:43:00 -0600 Subject: [PATCH] fix edge case for temp mute penalties with no expiration --- WebfrontCore/Views/Client/Profile/Index.cshtml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index 983aad3f..f6dcc524 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -47,9 +47,12 @@ @(ViewBag.Authorized ? !string.IsNullOrEmpty(Model.ActivePenalty.AutomatedOffense) && Model.ActivePenalty.Type != EFPenalty.PenaltyType.Warning ? Utilities.FormatExt(ViewBag.Localization["WEBFRONT_PROFILE_ANTICHEAT_DETECTION"], Model.ActivePenalty.AutomatedOffense) : Model.ActivePenalty.Offense.StripColors() : Model.ActivePenalty.Offense.StripColors()) break; case "time": - - @((Model.ActivePenalty.Expires.Value - DateTime.UtcNow).HumanizeForCurrentCulture()) - + if (Model.ActivePenalty.Expires.HasValue) + { + + @((Model.ActivePenalty.Expires.Value - DateTime.UtcNow).HumanizeForCurrentCulture()) + + } break; default: @result.MatchValue