Browse Source

Add response check, fixes #252

unreleased_contents
Frederic Hemberger 13 years ago
parent
commit
029fa9bf31
  1. 5
      .themes/classic/source/javascripts/github.js

5
.themes/classic/source/javascripts/github.js

@ -15,7 +15,8 @@ var github = (function(){
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
, success: function(data) {
var repos = [];
for (var i = 0; i < data.repositories.length; i++){
if (!data || !data.repositories) { return; }
for (var i = 0; i < data.repositories.length; i++) {
if (options.skip_forks && data.repositories[i].fork) { continue; }
repos.push(data.repositories[i]);
}
@ -30,7 +31,7 @@ var github = (function(){
if (options.count) { repos.splice(options.count); }
render(options.target, repos);
}
})
});
}
};
})();

Loading…
Cancel
Save