Skip to content

Commit

Permalink
fix(lsp): invalid access in fzf_lsp_locations
Browse files Browse the repository at this point in the history
`fzf_lsp_locations` was making an access to a nil value, for example
when calling `lsp_incoming_calls` on a element that does not have any
incoming calls.

ref: #1664
  • Loading branch information
abonnaudet-ledger authored and ibhagwan committed Jan 2, 2025
1 parent 116170c commit 0dc6161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fzf-lua/providers/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ local function fzf_lsp_locations(opts, fn_contents)
if not opts then return end
opts = core.set_fzf_field_index(opts)
opts = fn_contents(opts)
if not opts.__contents then
if not opts or not opts.__contents then
core.__CTX = nil
return
end
Expand Down

0 comments on commit 0dc6161

Please sign in to comment.