We might not have a project.

This commit is contained in:
joshaber
2016-01-04 12:48:39 -05:00
parent 1a35545bd7
commit e3451090ed

View File

@@ -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))