mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-28 14:56:52 +08:00
Check kind safely
This commit is contained in:
@@ -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', ''),
|
||||
|
||||
Reference in New Issue
Block a user