Skip to content

Commit

Permalink
fix: nullability warning on SemanticVersion.Metadata
Browse files Browse the repository at this point in the history
this'd be unnecessary with NuGet/Home#12949 fixed
  • Loading branch information
amis92 committed Oct 18, 2023
1 parent 6a5f490 commit fd107ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Phalanx.App/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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)";

Expand Down

0 comments on commit fd107ea

Please sign in to comment.