From a2734d90c514eea27c4759c9f502adbcdfbce485 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Wed, 18 Sep 2024 01:23:26 -0700 Subject: [PATCH] fix: handle consumer access before neotest is initialized (#352) --- lua/neotest/consumers/overseer.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/neotest/consumers/overseer.lua b/lua/neotest/consumers/overseer.lua index 42c19072..0769ec6b 100644 --- a/lua/neotest/consumers/overseer.lua +++ b/lua/neotest/consumers/overseer.lua @@ -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, })