summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorDonnie West <me@donniewest.com>2019-10-18 12:58:12 -0500
committerDonnie West <me@donniewest.com>2019-11-08 16:41:38 -0600
commit4bdde366615d561465750369be76ea87b9ed3da8 (patch)
tree378205205e04baa79d9f88f5a206549f8b246d84 /autoload
parentdb5fe5659f260f63cc777ea7c42575fd0e44bcde (diff)
downloadale-4bdde366615d561465750369be76ea87b9ed3da8.zip
Check kind safely
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/completion.vim4
1 files changed, 3 insertions, 1 deletions
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', ''),