File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/PowerShellEditorServices.Protocol/Server Expand file tree Collapse file tree 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(
11621162 CommentHelpRequestParams requestParams ,
11631163 RequestContext < CommentHelpRequestResult > requestContext )
11641164 {
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+
11661174 int triggerLine = requestParams . TriggerPosition . Line + 1 ;
11671175
11681176 string helpLocation ;
@@ -1171,8 +1179,6 @@ protected async Task HandleCommentHelpRequest(
11711179 triggerLine ,
11721180 out helpLocation ) ;
11731181
1174- var result = new CommentHelpRequestResult ( ) ;
1175-
11761182 if ( functionDefinitionAst == null )
11771183 {
11781184 await requestContext . SendResult ( result ) ;
You can’t perform that action at this time.
0 commit comments