From c0d8579df43fb2763f08eb973401922b2ab6684e Mon Sep 17 00:00:00 2001 From: Nicolas Perriault Date: Mon, 7 Feb 2011 14:25:55 +0100 Subject: [PATCH] forks are no more included in language statistics (ping @naholyr) --- js/githubresume.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/githubresume.js b/js/githubresume.js index 5e8b4dd..b6d29be 100644 --- a/js/githubresume.js +++ b/js/githubresume.js @@ -113,6 +113,10 @@ var run = function() { var languages = {}; repos.forEach(function(elm, i, arr) { + if (arr[i].fork !== false) { + return; + } + if (arr[i].language) { if (arr[i].language in languages) { languages[arr[i].language]++; @@ -121,10 +125,6 @@ var run = function() { } } - if (arr[i].fork !== false) { - return; - } - var popularity = arr[i].watchers + arr[i].forks; sorted.push({position: i, popularity: popularity, info: arr[i]}); });