mirror of
https://github.com/baz-scm/awesome-reviewers.git
synced 2025-08-20 18:58:52 +03:00
Fix contributor label text processing
This commit is contained in:
@@ -111,8 +111,11 @@ fetch('/assets/data/contributors.json')
|
||||
attachContributorEvents();
|
||||
|
||||
function contributorStyle(labelsArr) {
|
||||
if (!labelsArr || !labelsArr.length) return '';
|
||||
const lower = labelsArr.map(l => l.toLowerCase());
|
||||
if (!Array.isArray(labelsArr) || !labelsArr.length) return '';
|
||||
const lower = labelsArr
|
||||
.filter(l => l && typeof l === 'string')
|
||||
.map(l => l.toLowerCase());
|
||||
if (!lower.length) return '';
|
||||
if (lower.length === 1) {
|
||||
return `Focuses on ${lower[0]} reviews.`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user