aboutsummaryrefslogtreecommitdiff
path: root/.themes
diff options
context:
space:
mode:
authorFrederic Hemberger <mail@frederic-hemberger.de>2011-10-28 16:21:02 +0200
committerFrederic Hemberger <mail@frederic-hemberger.de>2011-10-28 16:21:02 +0200
commit029fa9bf31b998e6f85b299ea284a4c070569dad (patch)
tree9bd8544a6739d24849379a3464631076c11a902a /.themes
parentd6afe77d4c18747bac7c0b08eb4dbf3414268026 (diff)
downloadmy_new_personal_website-029fa9bf31b998e6f85b299ea284a4c070569dad.tar.xz
my_new_personal_website-029fa9bf31b998e6f85b299ea284a4c070569dad.zip
Add response check, fixes #252
Diffstat (limited to '')
-rw-r--r--.themes/classic/source/javascripts/github.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js
index 82e11607..678775a9 100644
--- a/.themes/classic/source/javascripts/github.js
+++ b/.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);
}
- })
+ });
}
};
})();