We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f06b95f commit 7a828a0Copy full SHA for 7a828a0
src/PowerShellEditorServices/Services/PowerShellContext/Utilities/CommandHelpers.cs
@@ -96,7 +96,7 @@ public static async Task<CommandInfo> GetCommandInfoAsync(
96
.FirstOrDefault();
97
98
// Only cache CmdletInfos since they're exposed in binaries they are likely to not change throughout the session.
99
- if (commandInfo.CommandType == CommandTypes.Cmdlet)
+ if (commandInfo?.CommandType == CommandTypes.Cmdlet)
100
{
101
s_commandInfoCache.TryAdd(commandName, commandInfo);
102
}
0 commit comments