Const and comparison fixes.

h/t @YuriSolovyov
This commit is contained in:
joshaber
2015-11-30 11:47:06 -05:00
parent 3a06953820
commit e1aa23b92d

View File

@@ -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
})
}
}