fix(loader): no need to check plugin.dir in auto_load

This commit is contained in:
Folke Lemaitre 2024-06-24 23:42:51 +02:00
parent 9bcbbc17a7
commit 62a47b921f
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 5 additions and 4 deletions

View file

@ -525,7 +525,7 @@ end
function M.auto_load(modname, modpath)
local plugin = Plugin.find(modpath, { fast = not M.did_handlers })
if plugin and modpath:find(plugin.dir, 1, true) == 1 then
if plugin then
plugin._.rtp_loaded = true
-- don't load if:
-- * handlers haven't been setup yet