From bb8f114dcb432f9424db1654e6cb4e6c37283c33 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Fri, 18 Mar 2016 09:56:33 -0700 Subject: [PATCH] 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 :) --- src/git-repository-async.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index c5984eed4..82546b525 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -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