Skip to content

Commit

Permalink
fix: set default details to empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Dec 29, 2024
1 parent 3ef27bc commit 0350fee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/blink/cmp/lib/window/docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ local docs = {}
--- @param opts blink.cmp.RenderDetailAndDocumentationOpts
function docs.render_detail_and_documentation(opts)
local detail_lines = {}

local details = type(opts.detail) == 'string' and { opts.detail } or opts.detail
local details = type(opts.detail) == 'string' and { opts.detail } or opts.detail or {}
--- @cast details string[]
details = require('blink.cmp.lib.utils').deduplicate(details)

for _, v in ipairs(details) do
vim.list_extend(detail_lines, docs.split_lines(v))
end
Expand Down

0 comments on commit 0350fee

Please sign in to comment.