fix: deal with the case called with no opts (#113)

This commit is contained in:
JINNOUCHI Yasushi 2023-08-07 07:19:29 +09:00 committed by GitHub
parent 1f32091e2b
commit 0615dd6343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,9 +89,10 @@ function Frecency:setup()
}) })
end end
---@param opts FrecencyPickerOptions ---@param opts FrecencyPickerOptions?
---@return nil ---@return nil
function Frecency:start(opts) function Frecency:start(opts)
opts = opts or {}
self.picker = Picker.new(self.database, self.finder, self.fs, self.recency, { self.picker = Picker.new(self.database, self.finder, self.fs, self.recency, {
default_workspace_tag = self.config.default_workspace, default_workspace_tag = self.config.default_workspace,
editing_bufnr = vim.api.nvim_get_current_buf(), editing_bufnr = vim.api.nvim_get_current_buf(),