Skip to content

Commit 1898714

Browse files
committed
fix: add nil check
1 parent 72abb00 commit 1898714

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lua/cmake-tools/file_picker.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ function M.show_target_files(target)
9797
log.info(vim.inspect(target))
9898

9999
local targets = config:get_codemodel_targets()
100+
if targets.code ~= Types.SUCCESS then
101+
log.warn("Target not found in CodeModel")
102+
return
103+
end
104+
100105
for _, v in pairs(targets.data) do
101106
if v.name == target then
102107
pickers

0 commit comments

Comments
 (0)