diff --git a/src/git-repository-async.js b/src/git-repository-async.js index 658d3ddbd..394a158ba 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -774,8 +774,11 @@ export default class GitRepositoryAsync { _refreshStatus () { this._refreshingCount++ - const projectPathsPromises = this.project.getPaths() - .map(p => this.relativizeToWorkingDirectory(p)) + let projectPathsPromises = Promise.resolve([]) + if (this.project) { + projectPathsPromises = this.project.getPaths() + .map(p => this.relativizeToWorkingDirectory(p)) + } Promise.all(projectPathsPromises) .then(paths => paths.filter(p => p.length > 0))