mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 00:21:33 -07:00
fix build warnings
This commit is contained in:
parent
12bc3ef6e7
commit
f75d755e9e
@ -7,11 +7,11 @@ namespace Bloxstrap.Extensions
|
|||||||
{
|
{
|
||||||
public static string? GetDescription<TEnum>(this TEnum e)
|
public static string? GetDescription<TEnum>(this TEnum e)
|
||||||
{
|
{
|
||||||
string? enumName = e.ToString();
|
string? enumName = e?.ToString();
|
||||||
if (enumName == null)
|
if (enumName == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
FieldInfo? field = e.GetType().GetField(enumName);
|
FieldInfo? field = e?.GetType().GetField(enumName);
|
||||||
if (field == null)
|
if (field == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user