mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 03:24:13 +00:00
fix(cache): clear cached entry on errors
This commit is contained in:
parent
d50eab2164
commit
def5cc5816
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue