Merge pull request #258 from Ephemera/fix-error

Fix error when path is null
This commit is contained in:
Buu Nguyen 2016-02-11 09:08:43 -08:00
commit 0f3bf09194
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ class GitHub extends Adapter {
$.ajax(cfg)
.done((data) => {
if (path.indexOf('/git/trees') === 0 && data.truncated) {
if (path && path.indexOf('/git/trees') === 0 && data.truncated) {
this._handleError({status: 206}, cb)
}
else cb(null, data)