From 333346889de1ecf07d214ee0c0f1df893e32ccfa Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Sat, 6 Jul 2024 13:04:49 +0200 Subject: [PATCH] Fixed commit hash shortening --- Moonlight/Core/UI/Views/Admin/Sys/Index.razor | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Moonlight/Core/UI/Views/Admin/Sys/Index.razor b/Moonlight/Core/UI/Views/Admin/Sys/Index.razor index 12ba8a75..ce228a35 100644 --- a/Moonlight/Core/UI/Views/Admin/Sys/Index.razor +++ b/Moonlight/Core/UI/Views/Admin/Sys/Index.razor @@ -49,10 +49,14 @@
@{ - var commitText = $"{MoonlightService.BuildCommitHash.Substring(0, 7)}"; // TODO: Add update check (possible during startup, with error handling etc) + var commitHashShorted = string.IsNullOrEmpty(MoonlightService.BuildCommitHash) || MoonlightService.BuildCommitHash.Length < 7 + ? "" + : MoonlightService.BuildCommitHash.Substring(0, 7); + + // TODO: Add update check (possible during startup, with error handling etc) } - +