summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-10-09 10:12:31 +0100
committerw0rp <devw0rp@gmail.com>2019-10-09 10:12:31 +0100
commit3fe2223a48465c58c48a5a6a30ecf13ab92f7b97 (patch)
tree20e47e177a6b06047283f1b3c9e7e1c82784c9c1
parente8de12c9f0f3c1659b8598f25a7e045dd8ec4f24 (diff)
downloadale-3fe2223a48465c58c48a5a6a30ecf13ab92f7b97.zip
Fix #2800 - Ignore completion user data which is not a dictionary
-rw-r--r--autoload/ale/completion.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index 177a6acb..a15ca514 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -734,6 +734,10 @@ function! ale#completion#HandleUserData(completed_item) abort
let l:user_data = json_decode(l:user_data_json)
+ if type(l:user_data) isnot v:t_dict
+ return
+ endif
+
for l:code_action in get(l:user_data, 'codeActions', [])
call ale#code_action#HandleCodeAction(l:code_action)
endfor