Skip to content

Commit 8b1f490

Browse files
committed
fix(config_file): remove unnecessary nil checks
Reworked testing code to not need this
1 parent 01e2d41 commit 8b1f490

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lua/opencode/config_file.lua

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ function M.get_opencode_config()
99
if not M.config_promise then
1010
local state = require('opencode.state')
1111
M.config_promise = state.api_client:get_config()
12-
-- shouldn't normally happen but prevents error in replay tester
13-
if not M.config_promise then
14-
return
15-
end
1612
end
1713
return M.config_promise:wait() --[[@as OpencodeConfigFile|nil]]
1814
end
@@ -30,11 +26,7 @@ end
3026
function M.get_opencode_providers()
3127
if not M.providers_promise then
3228
local state = require('opencode.state')
33-
-- shouldn't normally happen but prevents error in replay tester
3429
M.providers_promise = state.api_client:list_providers()
35-
if not M.providers_promise then
36-
return
37-
end
3830
end
3931
return M.providers_promise:wait() --[[@as OpencodeProvidersResponse|nil]]
4032
end

0 commit comments

Comments
 (0)