From ea7af0ac27c7aae5dbbf96fbb68d41bbd68c94b0 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Thu, 5 Feb 2015 00:48:33 +0000 Subject: [PATCH] Define alphabetical ordering for equal contributors. --- js/credits.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/credits.js b/js/credits.js index 11a85d9..8a2f6b7 100644 --- a/js/credits.js +++ b/js/credits.js @@ -64,8 +64,12 @@ function addToList(listElement, person) { } function sortContributors(a,b) { - return b.contributions - a.contributions; -} + if (a.contributions != b.contributions) { + return b.contributions - a.contributions; + } else { + return a.name.localeCompare(b.name); + } +} function getContributor(name) { for (var i = 0; i < contributors.length; ++i) {