Skip to content

Commit

Permalink
fix(lightbulb): check user_data range
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Aug 4, 2024
1 parent a8b24b2 commit 2303d67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lspsaga/codeaction/lightbulb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ local function diagnostic_vim_to_lsp(diagnostics)
---@return lsp.Diagnostic
return vim.tbl_map(function(diagnostic)
local user_data = diagnostic.user_data or {}
if user_data.lsp and not vim.tbl_isempty(user_data.lsp) then
if user_data.lsp and not vim.tbl_isempty(user_data.lsp) and user_data.lsp.range then
return user_data.lsp
end
return {
Expand Down

0 comments on commit 2303d67

Please sign in to comment.