Skip to content

Commit

Permalink
Check result is null (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn authored and prabirshrestha committed Jan 9, 2019
1 parent 6f47fcb commit b9630e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/asyncomplete-lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ function! s:handle_completion(server_name, opt, ctx, data) abort
if type(l:result) == type([])
let l:items = l:result
let l:incomplete = 0
else
elseif type(l:result) == type({})
let l:items = l:result['items']
let l:incomplete = l:result['isIncomplete']
else
let l:items = []
let l:incomplete = 0
endif

call map(l:items, 'lsp#omni#get_vim_completion_item(v:val)')
Expand Down

0 comments on commit b9630e2

Please sign in to comment.