From 8c47335db6f913a8493a1bdf852b86d2702cdf6b Mon Sep 17 00:00:00 2001 From: joshaber Date: Tue, 17 Nov 2015 15:38:10 -0800 Subject: [PATCH] ES6 harder. --- src/git-repository-async.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index d0c7c2323..1969a9c6b 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -343,17 +343,17 @@ module.exports = class GitRepositoryAsync { // Returns a {Promise} that resolves true if the given path is a submodule in // the repository. isSubmodule (_path) { - return this.repoPromise.then(function (repo) { - return repo.openIndex() - }).then(function (index) { - let entry = index.getByPath(_path) - let submoduleMode = 57344 // TODO compose this from libgit2 constants + return this.repoPromise + .then(repo => repo.openIndex()) + .then(index => { + let entry = index.getByPath(_path) + let submoduleMode = 57344 // TODO compose this from libgit2 constants - if (entry.mode === submoduleMode) { - return true - } else { - return false - } - }) + if (entry.mode === submoduleMode) { + return true + } else { + return false + } + }) } }