From b7ef866a14787312022fc9ef2ece73c77e12f83d Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Mon, 22 Sep 2025 18:51:07 -0400 Subject: [PATCH] fix: type errors --- lua/cp/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/cp/init.lua b/lua/cp/init.lua index a3a5f8b..eed7d7b 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -719,7 +719,7 @@ end ---@param delta number 1 for next, -1 for prev ---@param language? string local function navigate_problem(delta, language) - if not state.get_platform() or not state.get_contest_id() then + if state.get_platform() == '' or state.get_contest_id() == '' then logger.log('no contest set. run :CP first', vim.log.levels.ERROR) return end @@ -949,7 +949,7 @@ local function parse_command(args) end end - if state.get_platform() and state.get_contest_id() then + if state.get_platform() ~= '' and state.get_contest_id() ~= '' then cache.load() local contest_data = cache.get_contest_data(state.get_platform(), state.get_contest_id()) if contest_data and contest_data.problems then