mirror of
https://github.com/neovim/nvim-lspconfig
synced 2024-09-16 14:24:07 +02:00
fix: check client when get client from cache (#2429)
This commit is contained in:
parent
3aac751554
commit
902d6aa314
1 changed files with 2 additions and 2 deletions
|
@ -245,7 +245,7 @@ function M.server_per_root_dir_manager(make_config)
|
|||
if clients[root_dir] then
|
||||
for _, id in pairs(clients[root_dir]) do
|
||||
local client = lsp.get_client_by_id(id)
|
||||
if client.name == client_name then
|
||||
if client and client.name == client_name then
|
||||
return client
|
||||
end
|
||||
end
|
||||
|
@ -258,7 +258,7 @@ function M.server_per_root_dir_manager(make_config)
|
|||
|
||||
for _, id in ipairs(all_client_ids) do
|
||||
local client = lsp.get_client_by_id(id)
|
||||
if client.name == client_name then
|
||||
if client and client.name == client_name then
|
||||
return client
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue