From 3280220e6c612d03a451d7ee0624893093dcb87b Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Mon, 4 Jan 2016 08:19:32 +0200 Subject: [PATCH] JSCS checker bug fix: minor fallouts from 751afea. --- autoload/syntastic/preprocess.vim | 9 +++++++-- plugin/syntastic.vim | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/autoload/syntastic/preprocess.vim b/autoload/syntastic/preprocess.vim index 750ee8cf..433ed146 100644 --- a/autoload/syntastic/preprocess.vim +++ b/autoload/syntastic/preprocess.vim @@ -157,9 +157,14 @@ function! syntastic#preprocess#iconv(errors) abort " {{{2 endfunction " }}}2 function! syntastic#preprocess#jscs(errors) abort " {{{2 - let out = [] - let json = s:_decode_JSON(join(a:errors, '')) + let errs = join(a:errors, '') + if errs ==# '' + return [] + endif + let json = s:_decode_JSON(errs) + + let out = [] if type(json) == type({}) for fname in keys(json) if type(json[fname]) == type([]) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 49ee6b82..e3caf6c4 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-67' +let g:_SYNTASTIC_VERSION = '3.7.0-68' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1