Skip to content

Commit

Permalink
fix: handle consumer access before neotest is initialized (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Sep 18, 2024
1 parent 44e927e commit a2734d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/neotest/consumers/overseer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ neotest.overseer = setmetatable(neotest.overseer, {
return neotest.overseer
end,
__index = function(_, key)
-- This can happen while neotest is still initializing
if not neotest.run then
return nil
end
return neotest.run[key]
end,
})
Expand Down

0 comments on commit a2734d9

Please sign in to comment.