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
|
end
|
||||||
|
|
||||||
chunk, err = M._loadfile(entry.modpath)
|
chunk, err = M._loadfile(entry.modpath)
|
||||||
|
M.dirty = true
|
||||||
if chunk then
|
if chunk then
|
||||||
M.dirty = true
|
|
||||||
entry.chunk = string.dump(chunk)
|
entry.chunk = string.dump(chunk)
|
||||||
|
else
|
||||||
|
M.cache[modkey] = nil
|
||||||
end
|
end
|
||||||
return chunk, err
|
return chunk, err
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue