mirror of https://github.com/folke/lazy.nvim.git
fix(plugin): check that import is a string. See #825
This commit is contained in:
parent
721e37b4dd
commit
c325c50ba4
|
@ -265,6 +265,9 @@ function Spec:import(spec)
|
||||||
if spec.import == "lazy" then
|
if spec.import == "lazy" then
|
||||||
return self:error("You can't name your plugins module `lazy`.")
|
return self:error("You can't name your plugins module `lazy`.")
|
||||||
end
|
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
|
if vim.tbl_contains(self.modules, spec.import) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue