Skip to content

Commit d21f48e

Browse files
committed
minimize diffs somewhat
1 parent e211db5 commit d21f48e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dotnet/src/webdriver/CommandInfoRepository.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ public bool IsCommandNameDefined(string commandName)
8989
/// <returns>The <see cref="HttpCommandInfo"/> for the specified command, or <see langword="null"/> if not found or value is not <typeparamref name="T"/>.</returns>
9090
public T? GetCommandInfo<T>(string commandName) where T : CommandInfo
9191
{
92+
T? toReturn = default;
9293
if (this.commandDictionary.TryGetValue(commandName, out CommandInfo? info))
9394
{
94-
return info as T;
95+
toReturn = info as T;
9596
}
9697

97-
return default;
98+
return toReturn;
9899
}
99100

100101
/// <summary>

0 commit comments

Comments
 (0)