Remove an unnecessary call to then().

I see that this file has a little use of async/await and many uses of `then()`.
Things would be much less verbose and much more linear if async/await were used throughout.
Would Atom be open to a PR that changes this?

For bonus points, we could also replace `'use babel'` with `/* @flow */` at the top of the file :)
This commit is contained in:
Michael Bolin
2016-03-18 09:56:33 -07:00
parent 74407fc025
commit bb8f114dcb

View File

@@ -158,8 +158,7 @@ export default class GitRepositoryAsync {
if (!this.projectAtRoot) {
this.projectAtRoot = this.getRepo()
.then(repo => this.project.relativize(repo.workdir()))
.then(relativePath => relativePath === '')
.then(repo => this.project.relativize(repo.workdir()) === '')
}
return this.projectAtRoot