From 4bdde366615d561465750369be76ea87b9ed3da8 Mon Sep 17 00:00:00 2001 From: Donnie West Date: Fri, 18 Oct 2019 12:58:12 -0500 Subject: Check kind safely --- autoload/ale/completion.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index 654279b8..d93acd66 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -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', ''), -- cgit v1.2.3