Skip to content

Commit 2303d67

Browse files
committed
fix(lightbulb): check user_data range
1 parent a8b24b2 commit 2303d67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lspsaga/codeaction/lightbulb.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ local function diagnostic_vim_to_lsp(diagnostics)
8181
---@return lsp.Diagnostic
8282
return vim.tbl_map(function(diagnostic)
8383
local user_data = diagnostic.user_data or {}
84-
if user_data.lsp and not vim.tbl_isempty(user_data.lsp) then
84+
if user_data.lsp and not vim.tbl_isempty(user_data.lsp) and user_data.lsp.range then
8585
return user_data.lsp
8686
end
8787
return {

0 commit comments

Comments
 (0)