Skip to content

Commit 65a258e

Browse files
committed
refactor
1 parent 3dd175f commit 65a258e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

github/coffee/repoCommits.coffee

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ get = (author, repo) ->
4242
request.get url, (err, res, body) ->
4343
throw err if err
4444
fantasyGithub.nextPage = null
45+
unless body
46+
return console.log 'no body'
4547
commitList = JSON.parse body
46-
unless res.headers.link
48+
unless res.headers.link
4749
return traverseList commitList
4850
_(httpLink.parse res.headers.link).each (link) ->
4951
if link.rel is 'next'

github/js/repoCommits.js

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
throw err;
6767
}
6868
fantasyGithub.nextPage = null;
69+
if (!body) {
70+
return console.log('no body');
71+
}
6972
commitList = JSON.parse(body);
7073
if (!res.headers.link) {
7174
return traverseList(commitList);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fantasy-github",
3-
"version": "0.0.1-4",
3+
"version": "0.0.1-5",
44
"private": true,
55
"dependencies": {
66
"express": "3.1.0",

0 commit comments

Comments
 (0)