mirror of
https://github.com/lewis6991/gitsigns.nvim
synced 2024-09-16 14:34:09 +02:00
fix: nil check for repo cache
This commit is contained in:
parent
2593efa3c5
commit
375c44bdfd
1 changed files with 6 additions and 1 deletions
|
@ -136,7 +136,12 @@ end
|
|||
|
||||
function M:unref()
|
||||
local gitdir = self.gitdir
|
||||
local refcount = repo_cache[gitdir][1]
|
||||
local repo = repo_cache[gitdir]
|
||||
if not repo then
|
||||
-- Already reclaimed by GC
|
||||
return
|
||||
end
|
||||
local refcount = repo[1]
|
||||
if refcount <= 1 then
|
||||
repo_cache[gitdir] = nil
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue