File tree 1 file changed +9
-9
lines changed
src/PowerShellEditorServices/Services/TextDocument/Handlers
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft Corporation.
2
2
// Licensed under the MIT License.
3
3
4
- using System ;
5
- using System . Collections . Generic ;
6
- using System . Linq ;
7
- using System . Management . Automation ;
8
- using System . Text ;
9
- using System . Text . RegularExpressions ;
10
- using System . Threading ;
11
- using System . Threading . Tasks ;
12
4
using Microsoft . Extensions . Logging ;
13
5
using Microsoft . PowerShell . EditorServices . Services ;
14
6
using Microsoft . PowerShell . EditorServices . Services . PowerShell ;
20
12
using OmniSharp . Extensions . LanguageServer . Protocol . Client . Capabilities ;
21
13
using OmniSharp . Extensions . LanguageServer . Protocol . Document ;
22
14
using OmniSharp . Extensions . LanguageServer . Protocol . Models ;
15
+ using System ;
16
+ using System . Collections . Generic ;
17
+ using System . Linq ;
18
+ using System . Management . Automation ;
19
+ using System . Text ;
20
+ using System . Text . RegularExpressions ;
21
+ using System . Threading ;
22
+ using System . Threading . Tasks ;
23
23
24
24
namespace Microsoft . PowerShell . EditorServices . Handlers
25
25
{
@@ -215,7 +215,7 @@ internal async Task<CompletionResults> GetCompletionsInFileAsync(
215
215
_logger ,
216
216
cancellationToken ) . ConfigureAwait ( false ) ;
217
217
218
- if ( result . CompletionMatches . Count == 0 )
218
+ if ( result is null || result . CompletionMatches . Count is 0 )
219
219
{
220
220
return new CompletionResults ( IsIncomplete : true , Array . Empty < CompletionItem > ( ) ) ;
221
221
}
You can’t perform that action at this time.
0 commit comments