Skip to content

Commit 60f17f0

Browse files
committed
Merge pull request #71 from chingjun/patch-1
Add error handling in getSha
2 parents 4927d2e + 0ab8f73 commit 60f17f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

github.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@
234234
// Just use head if path is empty
235235
if (path === "") return that.getRef("heads/"+branch, cb);
236236
that.getTree(branch+"?recursive=true", function(err, tree) {
237+
if (err) return cb(err);
237238
var file = _.select(tree, function(file) {
238239
return file.path === path;
239240
})[0];

0 commit comments

Comments
 (0)