diff --git a/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs b/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs index cfdebc527..b2257c3c2 100644 --- a/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs +++ b/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs @@ -1125,8 +1125,8 @@ protected async Task HandleCommentHelpRequest( helpLocation)); var help = analysisResults?.FirstOrDefault()?.Correction?.Edits[0].Text; - result.Content = help != null - ? (lines ?? ScriptFile.GetLines(funcText)).ToArray() + result.Content = help != null + ? (lines ?? ScriptFile.GetLines(help)).ToArray() : null; if (helpLocation != null &&