Skip to content

Commit

Permalink
Handle null items in LSP completer
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Jackson committed Jun 29, 2024
1 parent 6993255 commit cbb7964
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ycmd/completers/language_server/language_server_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,8 @@ def ComputeCandidatesInner( self, request_data, codepoint ):
items = result
is_incomplete = False
else:
items = result[ 'items' ]
# Some buggy servers return null for 'items' illegally
items = result.get( 'items' ) or []
is_incomplete = result[ 'isIncomplete' ]

# Note: _CandidatesFromCompletionItems does a lot of work on the actual
Expand Down

0 comments on commit cbb7964

Please sign in to comment.