Skip to content

Commit 4fc87d7

Browse files
fix enums again
1 parent 96cb7d6 commit 4fc87d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ArgumentSystem/Arguments/EnumArgument.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public static TryGet<object> Convert(BaseToken token, Script script, Type enumTy
5353
var stringRep = token.GetBestTextRepresentation(script);
5454

5555
// only allow exact matches or matches with the first letter not capitalized
56-
if (Enum.IsDefined(enumType, stringRep))
56+
if (Enum.IsDefined(enumType, stringRep) ||
57+
Enum.GetNames(enumType).Any(n => n.LowerFirst() == stringRep))
5758
{
5859
return Enum.Parse(enumType, stringRep, true);
5960
}

0 commit comments

Comments
 (0)