Skip to content

Commit 6625cb7

Browse files
Update MethodIndex.cs
1 parent 5181ef4 commit 6625cb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Code/MethodSystem/MethodIndex.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static TryGet<Method> TryGetMethod(string name)
9999

100100
var closestMethod = NameToMethodIndex.Keys
101101
.OrderBy(x => LevenshteinDistance(x, name))
102-
.First();
102+
.FirstOrDefault();
103103

104104
return $"There is no method with name '{name}'. Did you mean '{closestMethod ?? "<error>"}'?";
105105
}

0 commit comments

Comments
 (0)