fix(meta): when a plugin is both optional and disabled, then just delete it from the list
This commit is contained in:
parent
7c493713bc
commit
805b85c2ea
|
|
@ -305,7 +305,11 @@ function M:fix_disabled()
|
||||||
for _, plugin in pairs(self.plugins) do
|
for _, plugin in pairs(self.plugins) do
|
||||||
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
|
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
|
||||||
changes = changes + 1
|
changes = changes + 1
|
||||||
self:disable(plugin)
|
if plugin.optional then
|
||||||
|
self:del(plugin.name)
|
||||||
|
else
|
||||||
|
self:disable(plugin)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:rebuild()
|
self:rebuild()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue