mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
So much depends upon a return statement.
This commit is contained in:
@@ -774,17 +774,15 @@ export default class GitRepositoryAsync {
|
||||
_refreshStatus () {
|
||||
this._refreshingCount++
|
||||
|
||||
let projectPathsPromises = Promise.resolve([])
|
||||
let projectPathsPromises = [Promise.resolve('')]
|
||||
if (this.project) {
|
||||
projectPathsPromises = this.project.getPaths()
|
||||
.map(p => this.relativizeToWorkingDirectory(p))
|
||||
}
|
||||
|
||||
Promise.all(projectPathsPromises)
|
||||
return Promise.all(projectPathsPromises)
|
||||
.then(paths => paths.filter(p => p.length > 0))
|
||||
.then(projectPaths => {
|
||||
if (this._isDestroyed()) return []
|
||||
|
||||
return this._getStatus(projectPaths.length > 0 ? projectPaths : null)
|
||||
})
|
||||
.then(statuses => {
|
||||
|
||||
Reference in New Issue
Block a user