summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2021-07-13 08:37:21 +0900
committerGitHub <noreply@github.com>2021-07-13 08:37:21 +0900
commitd098124e59ba38b0fcd97b41eec4a6de81bc09ab (patch)
tree6ce946cee7ab5d7edcad4b21d38db81856cdf2ba
parentc8f669249ae064aa014ec180df3934f0a82cab29 (diff)
downloadale-d098124e59ba38b0fcd97b41eec4a6de81bc09ab.zip
Fix 3373 - do not crash on HandleUserData with invalid json (#3807)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
-rw-r--r--autoload/ale/completion.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index 4cf3a51a..5237288e 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -1002,7 +1002,7 @@ endfunction
function! ale#completion#HandleUserData(completed_item) abort
let l:user_data_json = get(a:completed_item, 'user_data', '')
let l:user_data = !empty(l:user_data_json)
- \ ? json_decode(l:user_data_json)
+ \ ? ale#util#FuzzyJSONDecode(l:user_data_json, v:null)
\ : v:null
if type(l:user_data) isnot v:t_dict