Skip to content

Commit

Permalink
fix(menu): avoid indexing string value
Browse files Browse the repository at this point in the history
  • Loading branch information
max397574 committed Oct 20, 2024
1 parent 06ede94 commit 3c5cb42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/care/menu/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Menu:draw_docs(entry)
local completion_item = doc_entry.completion_item
local documentation = completion_item.documentation
if
(documentation.value or documentation or ""):match("^%s*$")
((type(documentation) == "table" and documentation.value) or documentation or ""):match("^%s*$")
and (completion_item.detail or ""):match("^%s*$")
then
self.docs_window:close()
Expand Down

0 comments on commit 3c5cb42

Please sign in to comment.