Don't blow up on unrecognized session

This commit is contained in:
Tim Pope 2014-05-05 01:16:00 -04:00
parent fa7a19140b
commit 0b17709b56

View File

@ -200,7 +200,7 @@ endfunction
function! fireplace#nrepl#callback(body, type, fn)
let response = {'body': a:body, 'type': a:type}
if has_key(a:body, 'session')
if has_key(g:fireplace_nrepl_sessions, get(a:body, 'session'))
let response.session = g:fireplace_nrepl_sessions[a:body.session]
endif
call call(a:fn, [response])