Use async’s destroy callback in repo provider.

This commit is contained in:
Daniel Hengeveld
2015-11-03 16:39:01 +01:00
parent da0b129c83
commit 47edd1b984

View File

@@ -77,7 +77,7 @@ class GitRepositoryProvider
unless repo
repo = GitRepository.open(gitDirPath, {@project, @config})
return null unless repo
repo.onDidDestroy(=> delete @pathToRepository[gitDirPath])
repo.async.onDidDestroy(=> delete @pathToRepository[gitDirPath])
@pathToRepository[gitDirPath] = repo
repo.refreshIndex()
repo.refreshStatus()