Skip to content

Commit f75d755

Browse files
fix build warnings
1 parent 12bc3ef commit f75d755

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Bloxstrap/Extensions/TEnumEx.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ internal static class TEnumEx
77
{
88
public static string? GetDescription<TEnum>(this TEnum e)
99
{
10-
string? enumName = e.ToString();
10+
string? enumName = e?.ToString();
1111
if (enumName == null)
1212
return null;
1313

14-
FieldInfo? field = e.GetType().GetField(enumName);
14+
FieldInfo? field = e?.GetType().GetField(enumName);
1515
if (field == null)
1616
return null;
1717

0 commit comments

Comments
 (0)