Skip to content

Commit 6b57329

Browse files
committed
fix nil logic for test spec
1 parent 9a6d587 commit 6b57329

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lua/neotest-vstest/init.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,10 @@ local function create_adapter(config)
514514
if position.type == "test" then
515515
logger.debug(position)
516516
local client = client_discovery.get_client_for_project(position.project, solution)
517-
local tests = projects[client] or {}
518-
projects[client] = vim.list_extend(tests, { position.id })
517+
if client then
518+
local tests = projects[client] or {}
519+
projects[client] = vim.list_extend(tests, { position.id })
520+
end
519521
end
520522
end
521523

0 commit comments

Comments
 (0)