mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-10 15:25:42 -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)
|
||||
{
|
||||
string? enumName = e.ToString();
|
||||
string? enumName = e?.ToString();
|
||||
if (enumName == null)
|
||||
return null;
|
||||
|
||||
FieldInfo? field = e.GetType().GetField(enumName);
|
||||
FieldInfo? field = e?.GetType().GetField(enumName);
|
||||
if (field == null)
|
||||
return null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user