From aec0a1a15a4d24b7b5f1c619bbfd123331ad64f4 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 16 Sep 2018 18:17:04 +0200 Subject: [PATCH] languageclient: Check severity key before accessing it closes #1793 --- autoload/airline/extensions/languageclient.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/languageclient.vim b/autoload/airline/extensions/languageclient.vim index 98d51a56..f9b7771a 100644 --- a/autoload/airline/extensions/languageclient.vim +++ b/autoload/airline/extensions/languageclient.vim @@ -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