Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ab8f73

Browse files
committed
Add error handling in getSha
1 parent 807498f commit 0ab8f73

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
@@ -237,6 +237,7 @@
237237
// Just use head if path is empty
238238
if (path === "") return that.getRef("heads/"+branch, cb);
239239
that.getTree(branch+"?recursive=true", function(err, tree) {
240+
if (err) return cb(err);
240241
var file = _.select(tree, function(file) {
241242
return file.path === path;
242243
})[0];

0 commit comments

Comments
 (0)