diff --git a/lib/git/tag.js b/lib/git/tag.js index 538836c..731f374 100644 --- a/lib/git/tag.js +++ b/lib/git/tag.js @@ -20,6 +20,7 @@ Tag.find_all = function(repo, options, callback) { // Let's fetch the references repo.git.refs({}, prefix('tag'), function(err, refs) { if(err) return callback(err, refs); + if(!refs) return callback(null, []); // Map the references var mapped_refs = refs.split(/\n/).map(function(ref) { // Fetch the name and id for the reference @@ -37,4 +38,4 @@ Tag.find_all = function(repo, options, callback) { callback(null, mapped_refs); }) -} \ No newline at end of file +}