mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
fix(lsp): handle array with empty string when checking empty hover (#35423)
This commit is contained in:
@@ -70,8 +70,10 @@ function M.hover(config)
|
|||||||
elseif result and result.contents then
|
elseif result and result.contents then
|
||||||
-- Make sure the response is not empty
|
-- Make sure the response is not empty
|
||||||
if
|
if
|
||||||
(type(result.contents) == 'table' and #(vim.tbl_get(result.contents, 'value') or '') > 0)
|
(
|
||||||
or type(result.contents == 'string') and #result.contents > 0
|
type(result.contents) == 'table'
|
||||||
|
and #(vim.tbl_get(result.contents, 'value') or result.contents[1] or '') > 0
|
||||||
|
) or (type(result.contents) == 'string' and #result.contents > 0)
|
||||||
then
|
then
|
||||||
results1[client_id] = result
|
results1[client_id] = result
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user