diff options
author | Alexey Svirschevskiy <[email protected]> | 2022-01-26 19:15:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-26 21:45:42 +0330 |
commit | 0a28cdf9d6f03b86f55a95854fcd2f29a468d476 (patch) | |
tree | c73ebd24a46dde367dbcf85d689f93335c2bb99c /lua/lvim/lsp/config.lua | |
parent | 25e8b2234915f7862d1c6fcd9477b0c1b1ea1bf4 (diff) |
fix(lsp): avoid accessing undefined user_data (#2216)
Co-authored-by: Alexey Svirshchevskiy <[email protected]>
Diffstat (limited to 'lua/lvim/lsp/config.lua')
-rw-r--r-- | lua/lvim/lsp/config.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index fb59ca51..3d62461d 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -23,7 +23,7 @@ return { prefix = "", format = function(d) local t = vim.deepcopy(d) - local code = d.code or d.user_data.lsp.code + local code = d.code or (d.user_data and d.user_data.lsp.code) if code then t.message = string.format("%s [%s]", t.message, code):gsub("1. ", "") end |