From e1aa23b92d1f46bd525643abcdc5595f4f31ad10 Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 30 Nov 2015 11:47:06 -0500 Subject: [PATCH] Const and comparison fixes. h/t @YuriSolovyov --- src/git-repository-async.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index 1969a9c6b..4051f5df6 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -346,14 +346,9 @@ module.exports = class GitRepositoryAsync { 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 - } + const entry = index.getByPath(_path) + const submoduleMode = 57344 // TODO compose this from libgit2 constants + return entry.mode === submoduleMode }) } }