From e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 15 Feb 2025 23:09:58 +0100 Subject: [PATCH] test: fix tests --- lua/lazy/core/meta.lua | 2 +- tests/core/plugin_spec.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/meta.lua b/lua/lazy/core/meta.lua index 5e026f4..0a55656 100644 --- a/lua/lazy/core/meta.lua +++ b/lua/lazy/core/meta.lua @@ -306,7 +306,7 @@ function M:fix_disabled() local changes = 0 local function check(top) for _, plugin in pairs(self.plugins) do - if plugin._.top == top then + if (plugin._.top or false) == top then if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then changes = changes + 1 if plugin.optional then diff --git a/tests/core/plugin_spec.lua b/tests/core/plugin_spec.lua index 166dc2a..7982649 100644 --- a/tests/core/plugin_spec.lua +++ b/tests/core/plugin_spec.lua @@ -25,6 +25,7 @@ local function clean(plugins) if plugin._.dep == false then plugin._.dep = nil end + plugin._.top = nil return plugin end, plugins) end