File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,13 @@ function M.check_autoload(modname, modpath)
77
77
-- only needed when the plugin mod has been loaded
78
78
--- @type LazyCorePlugin
79
79
local Plugin = package.loaded [" lazy.core.plugin" ]
80
- if Plugin and not Plugin . loading then
80
+ if Plugin then
81
81
local plugin = Plugin .find (modpath )
82
82
if plugin and modpath :find (plugin .dir , 1 , true ) == 1 then
83
83
-- we're not interested in loader time, so calculate delta here
84
84
M .stats .autoload .time = M .stats .autoload .time + uv .hrtime () - start
85
- if not plugin ._ .loaded then
85
+ -- don't load if we're loading specs or if the plugin is already loaded
86
+ if not (Plugin .loading or plugin ._ .loaded ) then
86
87
if plugin .module == false then
87
88
error (" Plugin " .. plugin .name .. " is not loaded and is configured with module=false" )
88
89
end
You can’t perform that action at this time.
0 commit comments