Check kind safely

This commit is contained in:
Donnie West 2019-10-18 12:58:12 -05:00
parent db5fe5659f
commit 4bdde36661
No known key found for this signature in database
GPG Key ID: EDADD24E208C4B87
1 changed files with 3 additions and 1 deletions

View File

@ -298,7 +298,9 @@ function! ale#completion#ParseTSServerCompletions(response) abort
let l:names = []
for l:suggestion in a:response.body
if g:ale_completion_tsserver_remove_warnings == 0 || l:suggestion.kind isnot# 'warning'
let l:kind = get(l:suggestion, 'kind', '')
if g:ale_completion_tsserver_remove_warnings == 0 || l:kind isnot# 'warning'
call add(l:names, {
\ 'word': l:suggestion.name,
\ 'source': get(l:suggestion, 'source', ''),