From 193e3504408118687a4063d19d6245cc676281c8 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 24 May 2019 08:13:31 +0200 Subject: [PATCH] Check existence of variable before trying to set it closes #1924 --- autoload/airline/async.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index 74c4e72..5732077 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -66,7 +66,8 @@ endfunction function! s:set_clean_variables(file, vcs, val) let var=getbufvar(fnameescape(a:file), 'buffer_vcs_config', {}) - if has_key(var, a:vcs) && has_key(var[a:vcs], 'dirty') + if has_key(var, a:vcs) && has_key(var[a:vcs], 'dirty') && + \ type(getbufvar(fnameescape(a:file), 'buffer_vcs_config')) == type({}) let var[a:vcs].dirty=a:val call setbufvar(fnameescape(a:file), 'buffer_vcs_config', var) unlet! b:airline_head