Skip to content

Commit c4b2e03

Browse files
authored
fix(utils): use proper empty check (#1380)
M.empty do not exists and is on the base utils Signed-off-by: Tomas Slusny <[email protected]>
1 parent ad2c759 commit c4b2e03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/CopilotChat/utils/files.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ M.grep = async.wrap(function(path, opts, callback)
188188
end
189189
end
190190

191-
if M.empty(cmd) then
191+
if vim.tbl_isempty(cmd) then
192192
error('No executable found for grep')
193193
return
194194
end
@@ -321,7 +321,7 @@ function M.uri_to_filename(uri)
321321
return uri
322322
end
323323
local ok, fname = pcall(vim.uri_to_fname, uri)
324-
if not ok or M.empty(fname) then
324+
if not ok or not fname or fname == '' then
325325
return uri
326326
end
327327
return fname

0 commit comments

Comments
 (0)