style(lua): format URL-open condition in setup

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Harivansh Rathi 2026-02-22 22:16:48 -05:00 committed by Barrett Ruth
parent 1c31abe3d6
commit e989897c77

View file

@ -145,7 +145,8 @@ function M.setup_contest(platform, contest_id, problem_id, language)
start_tests(platform, contest_id, problems)
local is_new_problem = old_problem_id ~= pid
local should_open_url = config_module.get_config().open_url and (is_new_contest or is_new_problem)
local should_open_url = config_module.get_config().open_url
and (is_new_contest or is_new_problem)
if should_open_url and contest_data.url then
vim.ui.open(contest_data.url:format(pid))
end