Skip to content

Commit eaaabc9

Browse files
authored
fix: deal with the case that bufname is nil (#147)
ref nvim-telescope/telescope.nvim#2552 (comment)
1 parent 2119da4 commit eaaabc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/frecency/fs.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ FS.new = function(config)
3434
return self
3535
end
3636

37-
---@param path string
37+
---@param path string?
3838
---@return boolean
3939
function FS:is_valid_path(path)
40-
return Path:new(path):is_file() and not self:is_ignored(path)
40+
return not not path and Path:new(path):is_file() and not self:is_ignored(path)
4141
end
4242

4343
---@param path string

0 commit comments

Comments
 (0)