Skip to content

Commit

Permalink
fix: don't freak out when not passed a finders config
Browse files Browse the repository at this point in the history
As reported here:

    wincent/command-t#393 (comment)

if `options.finders` is not set to (at least an empty) table, we freak
out with:

    lua/wincent/commandt/init.lua:343: bad argument #1 to 'pairs' (table expected, got nil)
  • Loading branch information
Padmamanickam authored and wincent committed Aug 27, 2022
1 parent 459cab5 commit 15faf5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/wincent/commandt/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ commandt.setup = function(options)
require_string('selection_highlight')
require_boolean('smart_case')

for name, finder in pairs(options.finders) do
for name, finder in pairs(options.finders or {}) do
require_function_or_string('finders.' .. name .. '.command', nil, {
finders = {
[name] = {
Expand Down

0 comments on commit 15faf5c

Please sign in to comment.