mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
We might not have a project.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user