From 40d4ab156dbdc755de129f14610ca35b9d4b2892 Mon Sep 17 00:00:00 2001 From: "amis.tau.92@gmail.com" Date: Wed, 18 Oct 2023 14:46:34 +0200 Subject: [PATCH] fix: nullability warning on SemanticVersion.Metadata this'd be unnecessary with NuGet/Home#12949 fixed --- src/Phalanx.App/Shared/MainLayout.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phalanx.App/Shared/MainLayout.razor b/src/Phalanx.App/Shared/MainLayout.razor index cfe93eab0..91758c2a7 100644 --- a/src/Phalanx.App/Shared/MainLayout.razor +++ b/src/Phalanx.App/Shared/MainLayout.razor @@ -24,7 +24,7 @@ { if (GetFromAttribute() is { } version) { - return version.HasMetadata ? version.ToNormalizedString() + "+" + version.Metadata.Substring(0, Math.Min(version.Metadata.Length, 6)) : version.ToFullString(); + return version.Metadata is { Length: > 0 } meta ? version.ToNormalizedString() + "+" + meta.Substring(0, Math.Min(meta.Length, 6)) : version.ToFullString(); } return "(n/a)";