languageclient: Check severity key before accessing it

closes #1793
This commit is contained in:
Christian Brabandt 2018-09-16 18:17:04 +02:00
parent da8035d8a8
commit aec0a1a15a
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ endfunction
function! s:airline_languageclient_get_line_number(type) abort
let linenumber_of_first_problem = 0
for d in s:diagnostics_for_buffer()
if d.severity == a:type
if has_key(d, 'severity') && d.severity == a:type
let linenumber_of_first_problem = d.range.start.line
break
endif