mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 19:34:15 +00:00
Add extra normalization check
This extra check will more optimistically try to normalize a spec formatted like this: ```lua return { {'foo/bar'}, baz = "asdf" } ``` Before, lazy.nvim would see that it's a table with a length of 1 and that it's not a list, so it tries to add the table containing the spec directly, instead of the spec itself. This check makes lazy.nvim proceed to normalize {'foo/bar'} instead.
This commit is contained in:
parent
657f0bb51c
commit
f45301032f
1 changed files with 1 additions and 1 deletions
|
@ -353,7 +353,7 @@ function Spec:normalize(spec, results)
|
|||
else
|
||||
self:add({ spec }, results)
|
||||
end
|
||||
elseif #spec > 1 or Util.is_list(spec) then
|
||||
elseif #spec > 1 or Util.is_list(spec) or type(spec[1]) == "table" then
|
||||
---@cast spec LazySpec[]
|
||||
local ignored_keys_exist = false
|
||||
for k, s in pairs(spec) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue