Skip to content

Commit

Permalink
fix(menu): ensure to not match on nil value
Browse files Browse the repository at this point in the history
  • Loading branch information
max397574 committed Oct 20, 2024
1 parent ba285f9 commit dc96a12
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/care/menu/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ function Menu:draw_docs(entry)
local function open_docs_window(doc_entry)
local config = self.config.ui.docs_view or {}
local completion_item = doc_entry.completion_item
if
not completion_item.documentation and not completion_item.detail
or (completion_item.documentation:match("^%s*$") and completion_item.detail:match("^%s*$"))
then
if (completion_item.documentation or ""):match("^%s*$") and (completion_item.detail or ""):match("^%s*$") then
self.docs_window:close()
return
end
Expand Down

0 comments on commit dc96a12

Please sign in to comment.