mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
fix incorrect empty result from filepath_row_id()
This commit is contained in:
parent
a12e98f7c7
commit
afbb26d1e8
@ -89,9 +89,8 @@ end
|
||||
|
||||
function M:get_filepath_row_id(filepath)
|
||||
local res
|
||||
local func = function(db) res = db:select("files", { where = { path = filepath}}) end
|
||||
self.db:with_open(func)
|
||||
return res and res[1].id or nil
|
||||
self.db:with_open(function(db) res = db:select("files", { where = { path = filepath}}) end)
|
||||
return not vim.tbl_isempty(res) and res[1].id or nil
|
||||
end
|
||||
|
||||
function M:update(filepath)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user