fix(lint): make neovim 0.11 typecheck happy (#1844)

This commit is contained in:
yetone
2025-04-10 14:14:47 +08:00
committed by GitHub
parent 04336913b3
commit 7e31317fbc
9 changed files with 38 additions and 10 deletions

View File

@@ -82,7 +82,13 @@ function M.read_definitions(bufnr, symbol_name, show_line_numbers, on_complete)
---@type avante.lsp.Definition[]
local res = {}
for _, result in ipairs(results) do
if result.err then
on_complete(nil, result.err.message)
return
end
---@diagnostic disable-next-line: undefined-field
if result.error then
---@diagnostic disable-next-line: undefined-field
on_complete(nil, result.error.message)
return
end