Skip to content

Commit

Permalink
fix(loader): explicitely set package.loaded.modname to nil to prevent…
Browse files Browse the repository at this point in the history
… recursive loading errors
  • Loading branch information
folke committed Jul 22, 2024
1 parent 34b0126 commit 12f2c74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/lazy/core/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ function M.loader(modname)
end

if ret then
-- explicitly set to nil to prevent loading errors
package.loaded[modname] = nil
M.auto_load(modname, ret.modpath)
local mod = package.loaded[modname]
if type(mod) == "table" then
Expand Down

0 comments on commit 12f2c74

Please sign in to comment.