mirror of https://github.com/folke/lazy.nvim.git
fix(cache): clear cached entry on errors
This commit is contained in:
parent
d50eab2164
commit
def5cc5816
|
@ -189,9 +189,11 @@ function M.load(modkey, modpath)
|
|||
end
|
||||
|
||||
chunk, err = M._loadfile(entry.modpath)
|
||||
if chunk then
|
||||
M.dirty = true
|
||||
if chunk then
|
||||
entry.chunk = string.dump(chunk)
|
||||
else
|
||||
M.cache[modkey] = nil
|
||||
end
|
||||
return chunk, err
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue