mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(plugin): check that import is a string. See #825
This commit is contained in:
parent
721e37b4dd
commit
c325c50ba4
1 changed files with 3 additions and 0 deletions
|
@ -265,6 +265,9 @@ function Spec:import(spec)
|
|||
if spec.import == "lazy" then
|
||||
return self:error("You can't name your plugins module `lazy`.")
|
||||
end
|
||||
if type(spec.import) ~= "string" then
|
||||
return self:error("Invalid import spec. `import` should be a string: " .. vim.inspect(spec))
|
||||
end
|
||||
if vim.tbl_contains(self.modules, spec.import) then
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue