File tree 1 file changed +9
-3
lines changed
src/PowerShellEditorServices.Protocol/Server
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1162,7 +1162,15 @@ protected async Task HandleCommentHelpRequest(
1162
1162
CommentHelpRequestParams requestParams ,
1163
1163
RequestContext < CommentHelpRequestResult > requestContext )
1164
1164
{
1165
- ScriptFile scriptFile = this . editorSession . Workspace . GetFile ( requestParams . DocumentUri ) ;
1165
+ var result = new CommentHelpRequestResult ( ) ;
1166
+
1167
+ ScriptFile scriptFile ;
1168
+ if ( ! this . editorSession . Workspace . TryGetFile ( requestParams . DocumentUri , out scriptFile ) )
1169
+ {
1170
+ await requestContext . SendResult ( result ) ;
1171
+ return ;
1172
+ }
1173
+
1166
1174
int triggerLine = requestParams . TriggerPosition . Line + 1 ;
1167
1175
1168
1176
string helpLocation ;
@@ -1171,8 +1179,6 @@ protected async Task HandleCommentHelpRequest(
1171
1179
triggerLine ,
1172
1180
out helpLocation ) ;
1173
1181
1174
- var result = new CommentHelpRequestResult ( ) ;
1175
-
1176
1182
if ( functionDefinitionAst == null )
1177
1183
{
1178
1184
await requestContext . SendResult ( result ) ;
You can’t perform that action at this time.
0 commit comments