From 025d08a397666980a390a32aab9bcc3cc54b0438 Mon Sep 17 00:00:00 2001 From: James Glenn Date: Thu, 30 Apr 2020 11:30:57 -0500 Subject: [PATCH] fix comma issue --- js/contributors.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/contributors.js b/js/contributors.js index 1def644..362a047 100644 --- a/js/contributors.js +++ b/js/contributors.js @@ -9,8 +9,12 @@ function getContributors(page) { const contributorList = []; data.forEach((contributor, idx) => { + if (idx === 0 && page > 1) { + contributorList.push(', '); + } + contributorList.push(`${contributor.login}`); - if (idx < data.length - 1 || page > 1) { + if (idx < data.length - 1) { contributorList.push(', '); } });